What is swapfile.sys?
swapfile.sys is a hidden operating system file located at the root of your C:\ drive. It sits right next to its more famous siblings, pagefile.sys and hiberfil.sys.
Why Does It Exist?
Introduced in Windows 8, swapfile.sys is a specialized form of virtual memory. While pagefile.sys handles memory swapping for traditional desktop software (like Chrome or Photoshop), swapfile.sys is used exclusively for Universal Windows Platform (UWP) apps—these are the modern, sandboxed apps you download from the Microsoft Store, along with built-in Windows features like the Start Menu and Cortana.
When Windows needs to pause a modern app or put it to sleep in the background, it rapidly writes its memory state into swapfile.sys to free up your physical RAM for other tasks.
Can You Delete It?
No, you cannot and should not delete it manually.
Because it is an active, protected system file in constant use by the Windows kernel, any attempt to simply right-click and delete swapfile.sys will be blocked by a “File In Use” error. Even if you manage to force-delete it using third-party tools, your modern Windows apps (including the Start Menu) will likely crash or freeze.
How to Safely Remove It
If you absolutely must remove it, you have to tell Windows to stop generating it by completely disabling the paging file. (Warning: This is not recommended unless you have a massive amount of RAM, e.g., 64GB+).
- Press
Win + S, type Advanced system settings, and press Enter. - Under the Performance section, click Settings.
- Go to the Advanced tab and click Change… under Virtual memory.
- Uncheck “Automatically manage paging file size for all drives”.
- Select your
C:\drive, click No paging file, and click Set. - Restart your computer. Both
pagefile.sysandswapfile.syswill vanish.
What Happens If You Delete It?
If you disable it safely using the method above, you will reclaim about 256MB of storage space. However, your modern Windows apps will no longer be able to cleanly suspend themselves in the background, which could lead to increased physical RAM usage and potential system instability if you run out of memory.
Bottom Line
Leave swapfile.sys alone. It only takes up a tiny 256MB of space, and it is a critical component for keeping your Start Menu and Microsoft Store apps running smoothly in the background.
Discussion
Loading authentication...