Is It Safe to Delete Everything in Windows’ Disk Cleanup?

The Disk Cleanup tool included with Windows can quickly erase various system files and free up disk space. But some things–like “Windows ESD Installation Files” on Windows 10–probably shouldn’t be removed.

For the most part, the items in Disk Cleanup is safe to delete. But, if your computer isn’t running properly, deleting some of these things may prevent you from uninstalling updates, rolling back your operating system, or just troubleshooting a problem, so they’re handy to keep around if you have the space.

Disk Cleanup 101

You can launch Disk Cleanup from the Start menu–just search for “Disk Cleanup”. It will immediately scan for files it can delete and display a list to you. However, this just shows files you can delete with your current user account’s permissions.

Assuming you have administrator access to the computer, you’ll want to click “Clean Up System Files” to view a complete list of files you can delete.

To remove a group of files, check it. To keep a group of files, ensure it’s unchecked. You’ll see the maximum amount of data you can delete at the top of the window, and how much space you’ll actually save at the bottom. Click “OK” after you’re done selecting data and Disk Cleanup will delete the types of data you want to remove.

Windows ESD Installation Files Are Important

On Windows 10, there’s now a “Windows ESD installation files” option here. Deleting it can free a few gigabytes of hard disk space. This is probably the most important option on the list, as deleting it could cause you problems.

img_57a51cae153b2

These ESD files are used for “resetting your PC” to its factory default settings. If you delete these files, you’ll have more disk space–but you won’t have the files necessary to reset your PC. You may need to download Windows 10 installation media if you ever want to reset it.

We recommend not deleting this, unless you desperately need the few gigabytes in hard disk space. Deleting this will make your life harder if you ever want to use the “reset your PC” feature in the future.

Everything Else Disk Cleanup Can Delete

So what do all the other options do? We went through Disk Cleanup and made a list. Note that we used Disk Cleanup on a PC running Windows 10 with the Anniversary Update installed. Older versions of Windows may have slightly fewer options. Some options may only appear if you have certain types of system files on your hard drive.

  • Windows Update Cleanup: When you install updates from Windows Update, Windows keeps older versions of the system files around. This allows you to uninstall the updates later. However, if you don’t plan on ever uninstalling any Windows updates, this is a waste of space. This is safe to delete as long as your computer is working properly and you don’t plan on uninstalling any updates.
  • Windows Defender: This option deletes “non critical files used by Windows Defender“, according to the Disk Cleanup tool. Microsoft doesn’t explain what these files are anywhere, but it’s likely they’re just temporary files. You can select this option to free up some space and Windows 10’s built-in antivirus will continue running normally.
  • Windows upgrade log files: When you upgrade Windows–for example, upgrade from Windows 7 to 10, or upgrade from Windows 10’s November update to Windows 10’s Anniversary update–Windows creates log files. These log files can “Help identify and troubleshoot problems that occur”. If you don’t have any upgrade-related problems, feel free to delete these.
  • Downloaded Program Files: This folder contains ActiveX controls and Java applets that are downloaded from the Internet when you view certain web pages in Internet Explorer. Feel free to delete these. They’ll be automatically downloaded again when you visit a website that requires them, if you need them.
  • Temporary Internet Files: This contains your “browser cache” for Internet Explorer and Microsoft Edge. The cache includes bits and pieces of websites that are stored on your hard drive so you can load them faster in the future. You can clear this to free up space, but your browser cache will eventually fill up again. Note also that this only affects Microsoft’s browsers. Other browsers like Google Chrome and Mozilla Firefox have their own browser caches you would need to clear from within Chrome or Firefox themselves. Just remember: regularly erasing your browser cache slows down your web browsing.
  • System error memory dump files: When Windows crashes–known as a “blue screen of death“–the system creates a memory dump file. This file can help identify exactly what went wrong. However, these files can use a large amount of space. If you don’t plan on trying to troubleshoot any blue screens of death (or you’ve already fixed them), you can remove these files.
  • System archived Windows Error Reporting: When a program crashes, Windows creates an error report and sends it to Microsoft. These error reports can help you identify and fix problems. Archived error reports have been sent to Microsoft. You can choose to delete these, but you won’t be able to view reports about program crashes. If you’re not attempting to solve a problem, they’re probably not important.
  • System queued Windows Error Reporting: This is the same as “System archived Windows Error Reporting,” except it contains queued error reports that have not yet been sent to Microsoft.
  • Windows ESD installation files: This one is important! As described above, these files are stored on your PC and used to “Reset your PC” to its factory default settings. You can remove them to free up space, but then you’ll need to create and provide Windows installation media if you ever want to reset your PC.
  • Delivery Optimization Files: The “Windows Update Delivery Optimization Service” is the part of Windows 10 that uses your computer’s bandwidth to upload app and Windows updates to other computers. This option allows you to remove data that’s no longer needed, except for uploading to other PCs.
  • Device driver packages: Windows keeps old versions of device drivers, whether they were installed from Windows Update or elsewhere. This option will delete those old device driver versions and keep only the most recent one. You can remove these files if your PC and its devices seem to be working properly.
  • Previous Windows installation(s): When you upgrade to a new version of Windows, Windows keeps the old Windows system files around for 10 days. You can then downgrade within those 10 days. After the 10 days, Windows will delete the files to free up disk space–but you can delete them from here immediately. On Windows 10, installing a big update like the Anniversary Update or November Update is treated basically the same as upgrading to an entirely new version of Windows. So, if you recently installed the Anniversary Update, the files here will allow you to downgrade to the November Update.
  • Recycle Bin: Check this option and the Disk Cleanup tool will also empty your computer’s Recycle Bin when it runs.
  • Temporary Files: Programs frequently store data in a temporary folder. Check this option and Disk Cleanup will delete temporary files that haven’t been modified in over a week. This ensures that it should only delete temporary files programs aren’t using.
  • Temporary Windows installation files: These files are used by the Windows Setup process when installing a new version of Windows or a major update. If you’re not in the middle of a Windows installation, you can delete them to free up space.
  • Thumbnails: Windows creates thumbnail images for pictures, videos, and document files and stores them on your hard drive so they can be displayed quickly when you view that folder again. This option will delete those cached thumbnails. If you access a folder containing these types of files again, Windows will recreate the thumbnail cache for that folder.

We’ve also seen various other options here. Some only appear on previous versions of Windows, like Windows 7, and some only appear if your computer has certain types of files on its hard drive:

  • Temporary Setup Files: Programs sometimes create setup files when you’re installing them and don’t automatically clean them up. This option will delete setup files that are no longer being used for anything.
  • Offline Webpages: You can save web pages for “offline” browsing in Internet Explorer. Your “Offline Webpages” are web pages that have specifically been saved for offline use, and checking this will delete them.
  • Debug Dump Files: These are debugging files created after a crash to help pin down the cause of the crash. If you’re not trying to troubleshoot a problem, you can delete them.
  • Per User Archived Error Reporting: These are the same as “System archived Windows Error Reporting” files, but stored under a user account instead of system-wide.
  • Per User Queued Windows Error Reporting: These are the same as “System queued Windows Error Reporting” files, but stored under a user account instead of system-wide.
  • Old Chkdsk Files: The chkdsk tool runs when there’s file system corruption on your hard drive. If you see any “old chkdsk files”, these are fragments of corrupted files. You can safely remove them unless you’re trying to recover important, irreplaceable data.
  • Game Statistics Files: On Windows 7, these include your score information for included games like Solitaire and Minesweeper. Delete them and the game will forget your scores and other statistics.
  • Setup Log Files: These log files are created while software is installing. If a problem occurs, the log files can help identify the problem. If you’re not trying to troubleshoot a software installation, you can remove them.
  • System Error Minidump FIles: These are smaller memory dump files created when Windows crashes in a blue screen. They take less space than larger memory dump files, but can still provide helpful information that identifies the problem. You can delete these if you’re not trying to troubleshoot system problems.
  • Files Discarded by Windows Upgrade: These are system files that weren’t migrated to your new PC during a Windows Upgrade process. Assuming your computer is working properly, you can delete them to free up space.

Overall, you can safely delete almost everything in Disk Cleanup as long as you don’t plan on rolling back a device driver, uninstalling an update, or troubleshooting a system problem. But you should probably steer clear of those “Windows ESD Installation files” unless you’re really hurting for space.

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.