When your Windows computer is running out of RAM, it transfers some of its temporary data to certain files on your storage drive. One of these files is known as Swapfile.sys. But what is this file, and can you delete it to save disk space on your Windows machine?
Here’s what you need to know about Swapfile.sys.
What Is Swapfile.sys?
Swapfile.sys is a system file that stores app data that Windows does not need in physical RAM at the moment. And if you’re not sure what “RAM” is, it’ll be a good idea to check out our quick and dirty guide to RAM so you’re all caught up to speed.
Together with the Pagefile.sys and Hiberfil.sys files, Swapfile.sys forms what is known as virtual memory. Virtual memory is a way for Windows to use the computer’s storage drive to artificially extend its RAM capacity.
Swapfile.sys doesn’t store regular app data. It handles data from Universal Windows apps, which are programs built to run on Microsoft’s ecosystem of devices, such as PCs, smartphones, tablets, smartwatches, and Xbox consoles. Windows stores temporary data for traditional apps in Pagefile.sys.
Without Swapfile.sys, you’ll notice some Universal Windows apps you’ve installed becoming slow to respond or even crashing when RAM is low.
Where Is Swapfile.sys Located on Windows?
Swapfile.sys is located on your local storage drive (C:), but it’s hidden by default since it’s an important system file. That means you’ll have to reveal it in Folder Options.
To do that, follow the steps below:
- Press Win + S to open Windows Search.
- Type control panel in the search box and click on Control Panel when it shows up in the results.
- Click Appearance and Personalization > File Explorer Options.
- In the File Explorer Options dialog box, select the View tab.
- Make sure the Show hidden files, folders, and drives radial button and Hide protected operating system files check box are checked.
- Click OK to close the dialog box and apply the changes.
- Go to the root of your local drive (C:) and you’ll see that Swapfile.sys has been revealed.
If you want to hide it again, just uncheck the radial button and checkbox mentioned in step 5 above.
Can You Delete Swapfile.sys?
Yes, you can delete Swapfile.sys, but you can’t do so directly. Swapfile.sys is always being used by Windows, so if you try to delete it normally, you’ll be met with an error message telling you that “this action cannot be completed because the file is open in another program.”
However, if you are looking to delete it to save space on your storage drive, there’s really no need, as the file is small. On our system, it was about 16MB, which isn’t a lot of space that can have a significant impact on your storage needs. This is the typical size of the file on most systems.
But if you’re adamant about deleting Swapfile.sys or just want to know how it can be done, there’s a workaround.
How to Delete Swapfile.sys
To delete Swapfile.sys, you’ll have to delete Pagefile.sys, as the former is linked to the latter. Once you remove Pagefile.sys, the Swapfile.sys file will vanish alongside it.
However, we advise against deleting Pagefile.sys, as it can negatively impact your PC’s performance. The only scenario where it would be okay to delete it is if you have at least 16GB of RAM installed on your computer. That way, Windows has enough physical memory that it probably won’t need to offload any data during ordinary use.
Demystifying Swapfile.sys and What it Does
So, Swapfile.sys is the file Windows uses to store temporary data from Windows Universal apps. It’s an important file and should not be deleted unless you know you have a lot of RAM to spare.
If you learned about Swapfile.sys because you were searching for ways to clear space on your storage drive, there are better ways of going about it.