how to clear tmp folder

I has run virtualmin for 2 month. Now I change server.

when i backup data I saw in tmp folder have over 200000 file.

I try to delete it by FlashFTP and command rmdir, but it too slow

Plz tell me how clear this foldel faster and set schedule auto del all file in this folder every week


I would do it like so

cd /tmp

rm *

rm -r *

That will remove all files and folders do be carefull you are in the correect directory tho as it wont prompt you asking if your sure.


And yeah, deleting that many files could certainly take some time :slight_smile:

You can setup automatic deletion of temp files by logging into Virtualmin, and clicking Webmin -> Webmin -> Webmin Configuration -> Advanced, and set “Maximum age of temporary files”.