Vacuum is a small open-source program for cleaning the temporary folders on Windows. It is a command line interface (CLI) program and it works really fast when performing a periodic temporary directory cleanup. It offers many options and we can include it in batch scripts. We can also include it in scheduled tasks for automated temporary folder cleanup.
Even though the GitHub page for Vacuum talks about the temporary folder, this program can be used for cleaning up any folder in any location on your hard disk drive. It can be run as a standard user or as an administrator. In the latter case, we can use it to remove files from the system temporary folder which is usually located in the C:\Windows\TEMP. On the other hand, if we run Vacuum with standard user permissions, then we can clean the temporary folders located in the user profile folders.
If you run Vacuum without any parameters, it will clean files from the temporary folder for the current user’s profile that have not been touched (accessed, modified or used) in last 30 days. For knowing about all the possible parameters, we have to use the command vacuum –help.
If you want to specify a folder other than the default temporary folder, then you can use the -d switch for this. For example, if you want to clean a folder C:\Games then you can give the command vacuum -d C:\Games.
In a similar manner, if you want to clean a folder with files older than n number of days, then you can specify the number of days using the -p switch. For example, if you want to clean untouched in more than 7 days then you can give the command vacuum -p 7.
Vacuum does not delete the files permanently, but it moves them to the Recycle Bin. This way you can recover them if so desired at a later time.
You can download Vacuum from https://github.com/ForNeVeR/Vacuum.