3.7. Cleaning Up a Volume
You want to clean up unused or unneeded files on a volume to reclaim space.
Using a graphical user interface
Open Windows Explorer.
Right-click the drive you want to clean up and select Properties.
Click the General tab if it isn't opened by default.
Click the Disk Cleanup button. Depending on the size of the volume you are scanning, this can take a while to complete.
Under Files to delete, check the boxes beside the type of files you want to remove.
When you are done with your selections, click OK.
Click Yes to confirm that you want to delete the files.
Using a command-line interface
You can launch the Disk Cleanup tool from the command line by running the following command:
To target a specific drive, use the
> cleanmgr /d E:
You can automate the Disk Cleanup tool to run against all the
drives on a system in a couple of steps. First, you need to
configure the types of files you want to clean up. Run the cleanmgr utility with the
/sageset: option following by an integer.
The integer represents a Disk Cleanup profile. In the following
example, I'll use 1:
> cleanmgr /sageset:1
This opens the Disk Cleanup Settings property page. Under Files to
delete, check the boxes beside the types of files you
want to clean up. Click OK when you
are done. Now, use the
option followed by the same number we just used (1 in this
> cleanmgr /sagerun:1
This command enumerates all drives on the system and performs a disk clean up according ...