Windows does a pretty good job of cleaning up after itself, but it doesn't always delete data that your PC doesn't need. However, your system does have a tool -- Disk Cleanup -- that picks up the slack. In its basic form, it can empty your Recycle Bin and delete data such as temporary, log and error report files. Its advanced tools drill into your system, adding update, driver and Windows Defender files to the mix. For a deep clean, you can also use the tool to remove unwanted programs and system restore data.
Type Control Panel from your Start screen in Windows 8.1 and open the tool from the search results. Type admin in the search box and select Administrative Tools. In Windows 7, click the Start button and type Disk Cleanup in the search bar.
Select Disk Cleanup in Administrative Tools in Windows 8; in Windows 7 click the link in the search results in the Programs area. If prompted, select the disk drive you want to clean and select OK. Wait for the tool to analyze your drive.
Select Clean Up System Files in the Disk Cleanup window. At the moment, this window shows only some of the files you can delete. When you select the system file option, the tool runs a deeper analysis to include system files, such as data left from previous Windows installations and upgrade logs. Wait for the tool to analyze your drive again.
Select More Options in the Disk Cleanup window. Select Clean Up in Programs and Features to see a list of programs on your PC. Check if you can free space by removing any you no longer use. Right-click on a program to uninstall it.
You can also delete system restore points and shadow copies from the More Options window. Your PC sets restore points so you can take your system back in time if it develops problems; shadow copies are versions of files and backup images. Selecting Clean Up in this section keeps your most recent restore point but deletes the rest as well as all shadow copy data.
Select the Disk Cleanup tab to return to the main part of the window. Scroll though the Files To Delete list to see the types of files you can remove. Check the boxes next to any type of file you want to delete; uncheck boxes next to those you want to keep. If you don't know what a file is, select it to see a description under the list. If you see a View Files or View Pages button, select it if you want to open a list of files in that category. Select OK and then Delete Files.
Save files from a Disk Cleanup list if you want to keep some but delete the rest. Use the "View Files" option to open the list so you can move or copy the file to a different folder.
It's worth checking the contents of your Recycle Bin before emptying it in Disk Cleanup in case it contains files you've accidentally deleted. If you prefer, empty the Recycle Bin manually.
Run a Disk Cleanup analysis every few weeks to see if your system needs cleaning.
You can also download free PC cleaning programs, some of which have more features than Disk Cleanup. For example, CCleaner also has registry, cookie and browser cleaning features and SlimCleaner can identify malware data. If your PC is relatively new, it may be worth downloading the free 60-day trial of jv16 PowerTools X. This has a useful tool that finds unwanted programs that your PC manufacturer may have installed on your system. (See Resources)
Microsoft decides which files are safe to delete in Disk Cleanup, so you shouldn't have any performance issues if you remove them. However, you may have problems if you delete Windows update data or service pack backup files and ever need to roll back to previous updates.
Don't delete programs on your PC if you don't know what they do. You may accidentally remove something important.
If you have issues with your PC's performance, don't use Disk Cleanup to delete restore points. They may help you fix the problem.