Is It Safe to Delete These Windows Files? A File-by-File Answer
The Safe, Conditional and Never-Touch Lists
Short answer: temporary files, Windows.old, Prefetch, the thumbnail cache and the SoftwareDistribution download folder are safe to delete. pagefile.sys and hiberfil.sys should not be deleted but can be disabled through Windows settings. WinSxS, C:\Windows\Installer, System32 and System Volume Information must never be touched by hand — deleting them permanently breaks program uninstalls, Windows updates and system recovery.
The internet is full of "delete this folder, reclaim 20 GB" advice. Some of it is correct and some of it leaves damage that only surfaces years later, when an update refuses to install or a program cannot be uninstalled. This guide sorts the space hogs in Windows into three clear buckets: safe, conditional and never. For each entry you get what it is, how much space it typically uses and exactly what you lose by removing it.
Key Takeaways
- Temporary files (%TEMP% and C:\Windows\Temp) are always safe to delete; Windows automatically skips any file currently in use.
- Windows.old is safe to delete, but you lose the ability to roll back to your previous Windows version. It is removed automatically after 10 days anyway.
- Never delete anything from WinSxS by hand. Its reported size is misleading because most files inside are hard links; the only safe cleanup is DISM /StartComponentCleanup.
- Deleting C:\Windows\Installer is the most common and most destructive advice online: it permanently breaks uninstall and repair for every MSI-based program.
- pagefile.sys and hiberfil.sys are not deleted but disabled — through virtual memory settings and the powercfg /hibernate off command respectively.
- The Prefetch folder can be deleted but should not be: apps launch slightly slower for a few days until Windows rebuilds the data, and the space saved is negligible.
Safe to Delete: Temporary Files and Caches
Temporary file folders are the single largest area you can clear in Windows without risk. The user temp folder %TEMP% (usually C:\Users\YourName\AppData\Local\Temp) and the system temp folder C:\Windows\Temp fill up with installer leftovers, abandoned downloads and program working files. On a machine that has never been cleaned, these two folders together commonly hold between 5 and 20 GB.
Deleting them carries no risk because Windows locks any file that is currently in use and refuses to remove it, even if you select everything. If a running program is holding a temp file, that file is simply skipped — no error, no damage.
The same category includes the thumbnail cache (thumbcache_*.db), Windows Update logs, memory dump files (.dmp) and Delivery Optimization files. All of them are regenerated on demand. Disk Mop's Cache Cleaner lists around twenty of these categories on one screen and shows how much each one is holding before you delete anything.
Safe to Delete: Windows.old and Upgrade Leftovers
Windows.old is created after a major Windows version upgrade and contains your entire previous installation. It is typically 15 to 30 GB, and its only purpose is to let you roll back to the old version within the first 10 days after upgrading.
Deleting it is safe; the only thing you give up is that rollback option. Windows removes the folder on its own after 10 days regardless. If the new version is running fine, you can reclaim the space immediately via Settings > System > Storage > Temporary files by ticking "Previous Windows installation(s)".
You will often find the hidden $WINDOWS.~BT and $WINDOWS.~WS folders alongside it. These are working files from the upgrade process and are cleared from the same screen. Trying to delete them manually in File Explorer produces permission errors — the built-in cleanup tool is always the correct route.
Conditional: pagefile.sys, hiberfil.sys and Prefetch
pagefile.sys is the virtual memory file and its size scales with your RAM; on a 16 GB machine it typically occupies several gigabytes. You cannot delete it — Windows recreates it immediately. If you want it smaller, set a custom size under Advanced system settings > Performance > Advanced > Virtual memory. Disabling it entirely causes application crashes on low-RAM systems and eliminates kernel crash dumps, which makes future troubleshooting much harder.
hiberfil.sys backs the hibernation feature and takes roughly 40% of your installed RAM. The correct way to remove it is powercfg /hibernate off in an administrator command prompt, which deletes the file for you. The cost: hibernation is disabled, and so is Windows Fast Startup, which may add a few seconds to boot time.
The Prefetch folder (C:\Windows\Prefetch) holds small files that help frequently used applications launch faster and rarely exceeds a few hundred megabytes. Deleting it is harmless but pointless: the space you reclaim is negligible, and in exchange your applications open a little slower for several days while Windows rebuilds the data. It can be done, but there is no reason to do it.
Never Touch: WinSxS and C:\Windows\Installer
WinSxS, the component store, holds every Windows system component and every superseded update version. File Explorer usually reports it as more than 10 GB, but that figure is misleading: most of the files inside are hard links to files that live elsewhere in Windows, so the same data is counted twice. The real recoverable space is typically far smaller than the number shown.
Deleting files from this folder breaks Windows in ways that cannot be repaired: updates fail to install, system file checks fail, and some features can no longer be enabled. The only correct cleanup is DISM /Online /Cleanup-Image /StartComponentCleanup in an administrator command prompt, which removes only genuinely superseded component versions.
C:\Windows\Installer is the target of the single most dangerous piece of advice on the internet. The folder is hidden, can grow to tens of gigabytes, and the .msi and .msp files inside look like junk. They are not: Windows uses them whenever you uninstall or repair an MSI-based program. Delete them and applications like Microsoft Office can neither be removed nor repaired, and a clean OS install is often the only way out. Leave this folder alone.
Never Touch: System32, the Driver Store and System Restore
C:\Windows\System32 is Windows itself; removing files from it makes the system unbootable. The old "delete System32 to speed up your PC" line is one of the internet's oldest pranks, and people still fall for it.
C:\Windows\System32\DriverStore\FileRepository is the driver store and can hold 5 to 15 GB of accumulated driver packages, including old versions. Deleting from it by hand breaks driver updates and hardware recovery. If you genuinely need that space, the correct tool is pnputil /enum-drivers to list packages and remove only the obsolete ones.
System Volume Information holds System Restore points and Shadow Copies, and access to it is restricted deliberately. To reclaim space, lower the disk percentage reserved for restore points, or delete old points, under Control Panel > System > System Protection. Forcing your way into the folder to delete files leaves system recovery non-functional.
Measure Before You Delete
The most useful lesson from this list is that the space you reclaim is often nothing like what you expected. WinSxS may report 12 GB and free up 2 GB; meanwhile a game cache you never think about may be sitting on 40 GB. The right order is always measure first, delete second.
Disk Mop's Disk Analysis scans your drive and lays folders out as a visual treemap sized by how much they actually hold, so the genuinely bloated folder is obvious at a glance. Its System File Protection enforces the never-touch list from this guide in code: critical paths such as System32, WinSxS and Installer are kept on a protected list, flagged separately if they ever appear in a delete operation, and never removed without an explicit confirmation.
You can download Disk Mop free and try it with limited features; the Pro version is a one-time $19.90 payment for a lifetime license. It runs on Windows 10 and 11 (64-bit) and macOS 12 or later.
Frequently Asked Questions
Is it safe to delete the Windows.old folder?
Yes. Windows.old exists only so you can roll back to your previous Windows version within 10 days of an upgrade. Deleting it costs you that rollback option and nothing else, and Windows removes the folder automatically after 10 days anyway. Use Settings > System > Storage > Temporary files and tick "Previous Windows installation(s)" rather than deleting it in File Explorer.
Can I delete the WinSxS folder?
No. Deleting files from WinSxS by hand permanently breaks Windows updates and system file repair. The folder size shown in File Explorer is also misleading, because most files inside are hard links and get counted twice. The only safe cleanup is running DISM /Online /Cleanup-Image /StartComponentCleanup from an administrator command prompt.
Does deleting C:\Windows\Installer free up space?
It does, but you should never do it. Windows uses the .msi and .msp files in that folder whenever you uninstall or repair an MSI-based program. Once deleted, applications such as Microsoft Office can neither be uninstalled nor repaired, and in many cases a clean reinstall of Windows is the only remaining fix.
Can pagefile.sys be deleted?
No — Windows recreates it immediately. If you need the space, set a custom size under Advanced system settings > Performance > Advanced > Virtual memory. Turning the page file off completely causes application crashes on systems with 8 GB of RAM or less and removes kernel crash dumps, which makes diagnosing future problems significantly harder.
How do I get rid of hiberfil.sys?
Run powercfg /hibernate off in an administrator command prompt. The file is removed automatically, freeing roughly 40% of your installed RAM in disk space. In exchange, hibernation is disabled along with Windows Fast Startup, which can add a few seconds to boot time.
Does deleting the Prefetch folder speed up my PC?
No, it does the opposite. Prefetch stores data that helps your frequently used applications launch faster, and it rarely exceeds a few hundred megabytes. Deleting it reclaims a negligible amount of space and makes applications open slightly slower for several days while Windows rebuilds the data.
Verdict
The safe path to free space in Windows is well defined: temporary files, caches, Windows.old and upgrade leftovers can be removed freely; pagefile.sys and hiberfil.sys are disabled through Windows settings rather than deleted; and WinSxS, Installer, System32, the driver store and System Volume Information should never be touched by hand.
A reliable rule of thumb: if deleting a folder in File Explorer requires administrator rights or taking ownership, that folder was probably not designed for you to delete. Use the tool Windows provides for that area instead — Storage settings, DISM, powercfg or the System Protection screen.
The biggest wins are usually not in these contested system folders at all, but in overlooked user data: forgotten downloads, duplicate photos, old game installs and leftovers from uninstalled programs. Measure first, then delete.
Stop Guessing What Is Safe to Delete
One-time payment for lifetime access to all features. No subscription, no hidden fees.
Download Disk Mop Now