"Which files can I safely delete on Windows?" is the wrong question to answer by guessing — a file's location tells you almost everything about whether it's safe to remove. Here's the breakdown by risk, not by size.
Safe to delete anytime
- Temp files in %temp% — regenerated automatically by whatever needs them
- Recycle Bin contents, once you've confirmed nothing in it is needed
- Browser cache — the first page load after clearing it is just slightly slower
- Thumbnail cache — Windows rebuilds thumbnails the next time you view a folder
- Old Windows Update installation files, once an update has finished successfully
Worth checking before you delete
- Your Downloads folder — often full of installers and files you already used once
- Large old files you don't remember opening in the last year
- Duplicate files scattered across folders from repeated saves or backups
- The Windows.old folder — a full copy of your previous Windows install
- Old game or software installers you already ran
Windows.old is only kept for about 10 days after an upgrade before Windows deletes it automatically, and it can hold 20–30 GB — safe to remove yourself sooner if you're not planning to roll back.
Crash dump files (Minidump and MEMORY.DMP)
After a blue screen, Windows saves a record of the crash in C:\Windows\Minidump and, depending on your settings, a larger C:\Windows\MEMORY.DMP that can reach several gigabytes. They are only useful for diagnosing the crash itself. Once the problem is dealt with, they are safe to remove, and Windows simply creates new ones if it crashes again.
Do not delete them by hand from the Windows folder. Open Settings → System → Storage → Temporary files and tick System error memory dump files, or run Disk Cleanup and choose Clean up system files.
What is the inetpub folder?
C:\inetpub is where IIS, the Windows web server feature, keeps its files. Since Microsoft's April 2025 security updates, an empty inetpub folder is also created on Windows 10 and 11 PCs that never had IIS, as part of a security fix.
Leave it alone. It is normally empty and takes no space, and Microsoft says it should not be deleted, whether or not you use IIS.
What is the SWSetup folder?
C:\SWSetup is created on many HP computers. It holds the driver and software installers HP shipped with the PC so they can be reinstalled. Once those drivers and apps are installed, it is usually just leftover installers, sometimes several gigabytes.
It is generally safe to delete. The only cost is losing the local copies: if you ever need one again, download it from HP's support site.
Can I delete the Prefetch folder?
C:\Windows\Prefetch holds small files Windows uses to start frequently used programs a little faster. Clearing it is harmless: Windows rebuilds it as you work, so apps may start slightly slower for a short while afterwards. But it frees almost no space and gives no speed gain, so there is no reason to go looking for it by hand. Cleanup tools often include it in a routine pass for exactly that reason, since it does no harm.
What are .tmp files?
A .tmp file is a scratch file a program creates while it works and normally removes when it is done. Leftovers in %temp% are safe to delete (see above); close your programs first so you do not remove one that is still in use. A .tmp file sitting next to a document you were editing can be an unsaved recovery copy, so check before deleting it.
Never delete these
- Anything inside the Windows or System32 folders
- Program Files or Program Files (x86), even for software you don't use — uninstall it properly instead
- pagefile.sys — Windows' virtual memory file
- hiberfil.sys — delete this only by disabling hibernation first with "powercfg /hibernate off", never by hand
- Any file you can't identify or connect to software you installed deliberately
The fastest safe way to check
Windows 11's built-in Disk Cleanup and Storage Sense already know which temp, cache, and update files in each category are safe to remove — they won't touch anything in the "never delete" list. An automated cleaner covers the same ground with less clicking, and flags large or duplicate files for you to review instead of guessing by folder name.
