This article explains what the swapfile.sys file is, why Windows uses it, and how to remove it by disabling the paging file system. It applies to Windows 10/11 and older releases.
Swapfile.sys is a system-managed file that is used for modern application paging. Swapfile.sys works together with pagefile.sys, and users have no manual control over it.
| File Name | Primary Purpose | Managed By | Can be deleted? |
| pagefile.sys | Virtual memory for apps | System | Yes (by disabling the paging file) |
| hiberfil.sys | Hibernation state data | System | Yes (through CMD) |
| swapfile.sys | UWP/Store app suspension | System | Only with pagefile.sys |
What Are the Sys Files on Drive C:?
Modern Windows versions, such as 11, 10, 8.1, and 8, have three weird files stored on drive C:. Those files are pagefile.sys, hiberfil.sys, and swapfile.sys. All three are notably large, which causes an unprepared user to consider deleting swapfile.sys and its โsiblingsโ to reclaim some storage on drive C:. This is a particularly relevant question for users with smaller SSD drives they use for Windows.

What is swapfile.sys in Windows 10 and 11?
The three sys files on drive C: are responsible for memory management and system state. The hiberfil.sys is for hibernation โ that is where Windows saves its current state when you put your computer to hibernation. You cannot delete the file using traditional methods (Delete or Shift+Delete) โ the only way to remove the hiberfil.sys is to disable hibernation.
The pagefile.sys is a virtual memory, or memory paging file Windows uses when running out of RAM. Finally, the swapfile.sys is similar to pagefile.sys. Its primary purpose is to โcacheโ UWP applications you install from the Microsoft Store. Windows 10 and 11 use the swapfile.sys file even when they have enough RAM to operate.
Another noteworthy fact is that pagefile.sys and swapfile.sys are tied together, and you cannot delete one and leave the other.
What Does Swapfile.sys Do?
Swapfile.sys is a system file that Windows protects from overly curious users who tend to Shift+Delete anything they do not recognize. Note that you may not see the swapfile.sys file on your drive C: right away. Therefore, here is how to find the swapfile.sys file in Windows 10 and 11:
- Open File Explorer and click View > Folder Options. If you use Windows 11, click the button with three dots and select Options.
- Go to the View tab and select Show hidden files, folders, and drives.
- Also, disable the Hide protected operating system files (Recommended) option.

Can I Delete the Swapfile.sys in Windows 10 and 11?
No, you can’t safely delete swapfile.sys as a file. Unlike hiberfil.sys, swapfile.sys cannot be removed independently. This file is managed automatically by the OS together with the paging system. To remove swapfile.sys, you must disable/modify the system-managed virtual memory config (and that’s strongly not recommended!).
How to Delete Swapfile.sys Step-by-Step
Disable Virtual Memory via System Settings
Swapfile.sys cannot be deleted independently because it is automatically managed by the operating system. It depends on the Windows paging system, the only supported way to remove it is to disable the paging file completely. Note that this also removes pagefile.sys and disables system-managed virtual memory. The file is recreated/removed based on system memory management changes.
Checking current paging file config
Before making changes, you can check the current paging file config using the CIM cmdlet:
Get-CimInstance Win32_PageFileUsage
This command displays the current paging file config and help you check if a paging file is currently configured on the system.
Now let’s move on with deleting Swapfile.sys. Follow the steps below:
- Open File Explorer and right-click This PC in the navigation pane.
- Select Properties.
- Click Advanced System Settings.

- Alternatively, press Win + S and type Advanced System Settings. Windows will return a link to the Control Panel, and the section we need to delete swapfile.sys in Windows 10 and 11.
- Click Settings in the Performance section on the Advanced tab.

- In a new window, go to the Advanced tab (yes, again) and locate the Virtual memory section.
- Click Change.

- Uncheck the Automatically manage paging file size for all drives option.
- Click No paging file.
Warning. Note that disabling the paging file may cause app crashes, memory allocation failures, problems creating crash dumps, and reduced system stability on computers with limited RAM. Also, keep in mind that some Windows memory dump options also require a paging file to be configured. We generally recommend you leaving the paging file enabled.
- Click Set.
- Click Ok to save the changes.
Restart your computer. Note that you need to select the Restart option, not Shutdown since Windows 10 and 11 use Startup and hybrid power off state by default to speed up the boot process.
Verify That Swapfile.sys Has Been Removed
After restarting your machine, you can check that the swapfile.sys file has been removed. Follow the steps below:
- Open File Explorer.
- Enable Show hidden files, folders, and drives.
- Disable Hide protected operating system files (Recommended).
- Browse to **C:**.
- Verify that the swapfile.sys file is no longer present.
You can also check for the file using the following PowerShell command:
Get-ChildItem C:\swapfile.sys -Force
If the command does not return any results, the swapfile.sys file is no longer present on the system.
You can also verify that the paging file has been disabled by checking the current paging file config. Use the following command:
Get-CimInstance Win32_PageFileUsage
If no paging file is configured, the command should return no active pagefile entries.
How to Move the Windows Paging File to Another Drive?
Important. Note that you cannot independently move swapfile.sys to another drive. The steps below configure the location of pagefile.sys, not swapfile.sys. Keep in mind that Windows manages swapfile.sys automatically as part of its paging subsystem.
Historically, some users moved the Windows paging file to another drive to reduce SSD writes or free space on the system drive. On modern SSDs, this is rarely necessary because contemporary drives are designed to handle typical paging workloads. If you need to move the paging file, you can config pagefile.sys to use another drive through the Virtual Memory settings. This does not move swapfile.sys, whose location is managed automatically by Windows. To move pagefile.sys to another drive, follow the steps below:
- Open File Explorer and right-click This PC in the navigation pane.
- Select Properties.
- Click Advanced System Settings.
- Alternatively, press Win + S and type Advanced System Settings. Windows will return a link to the Control Panel, and the section we need to delete swapfile.sys in Windows 10 and 11.
- Click Settings in the Performance section on the Advanced tab.
- In a new window, go to the Advanced tab and locate the Virtual memory section.
- Click Change.
- Uncheck the Automatically manage paging file size for all drives option.
- Click No paging file.
- Click Set.
- Agree to the warning.
- Select the drive you want from the list at the top of the window.
- Click System managed size.
- Click Set.
- Click Ok.
- Restart the machine for the new paging file location to take effect. After restarting, the paging file (pagefile.sys) will be created on the drive you selected. Note that this procedure does not move swapfile.sys. Windows continues to manage swapfile.sys automatically.
That is it. The location of swapfile.sys is managed automatically by Windows. Note that Microsoft does not provide a supported method to configure its location independently from the paging system.
Note. Moving swapfile.sys to a slower physical drive might result in notable performance slowdowns in UWP applications.
Wrapping Up
Swapfile.sys is a system-managed component of the Windows paging subsystem and you cannot remove it independently. The only supported way to remove it is to disable the paging file, which also removes pagefile.sys. In most cases, Microsoft recommends leaving virtual memory enabled unless there is a specific reason to change the default config.
What is swapfile.sys?
Swapfile.sys is a system-managed Windows file used for modern application paging. It works together with pagefile.sys, and users have no direct control over it.
What are pagefile.sys, hiberfil.sys, and swapfile.sys?
These are three system files stored on the C: drive in modern Windows versions (Windows 11, 10, 8.1, and 8). They are typically large and are related to memory management and system state.
Can I delete swapfile.sys in Windows 10/11?
No, you cannot safely delete swapfile.sys as a file. It is managed automatically by the operating system together with the paging system.
Does swapfile.sys affect Windows performance?
Yes. It is used by Windows for application paging, especially for UWP apps, even when enough RAM is available.


The “How to Move Swapfile.sys to Another Drive?” section should be renamed to “How to Move pagefile.sys to Another Drive?” because the provided instructions work only for the pagefile.sys and not for the swapfile.sys that remains in the “C:\” folder…
I second the comment made by “USER”. The instructions in this guide will have zero effect on c:\swapfile.sys and none of the guide will result in the user being able to move the Swapfile to another drive. I’ve moved my pagefile to a secondary NVMe and disabled pagefile on C, yet the swapfile sits on the C drive and cannot be moved. The lifesaving application “LockHunter” tells us that c:\swapfile.sys cannot be deleted or moved because it’s being used by “System”.