Can I Delete Swapfile.sys in Windows 10?

In Windows 8.1/10, in addition to the pagefile.sys and hiberfil.sys files that are already familiar to many users, the swapfile.sys file, which was not included in previous versions of the Windows OS, may be found in the root directory of the system disc (by default, it is C:). If you enable the option Show hidden files, folders, and drives in File Explorer’s options and disable Hide protected operating system files (Recommended), you’ll be able to see it. Swapfile.sys is similar to pagefile.sys in that it serves as a virtual memory for universal applications to temporarily store data (Metro Store apps). In this post, we’ll take a closer look at whether Swapfile.sys can be removed.

Can You Delete Swapfile.sys?

If an Advanced application is not utilised, it will be stopped and moved to swapfile.sys, where it will be retrieved when the user resumes the Metro-style app. There isn’t much public information on swapfile.sys, however based on Microsoft employee remarks, a distinct page file was required due to the universal application’s unique architecture. The job of application developers is made easier by the use of two independent paging files.

The pagefile and swapfile files in Windows 10 have similar goals, but they differ in terms of minimum disc space requirements, read/write processes, and the capacity to dynamically grow, among other things.

Many people question if swapfile.sys can be deleted and how to do so. In general, you can do this, but it’s not a good idea, especially since the control mechanisms are so strongly connected to the main page file. And, even on smaller SSD-drive volumes, the meaning of its absence is practically there. Because the maximum size of Swapfile.sys is usually less than 256 MB, there is essentially little to save in case it is destroyed.

Only the pagefile.sys and swapfile.sys files are managed by Windows. If you disable the volume’s paging file, swapfile.sys will be disabled as well.

You can disable swapfile.sys, but it’s not recommended, and if you have any problems with system performance afterward, you’ll need to undo your changes.

In Windows 10, how can I delete swapfile.sys?

Select Control Panel by pressing Win+X.

Select System -> Advanced System Settings from the drop-down menu.

On the Advanced tab in the section Performance press Settings button

Change to the Advanced tab and press the Change button.

Remove the check from the box. Manage the size of paging files for all discs automatically.
Choose No Paging File to remove swapfile.sys and pagingfile.sys from the drive you want to remove them from.

To save your changes, press Set and OK, then restart your computer.
Pagefile.sys and Swapfile.sys are removed from the root of the system drive once the system boots.

During the work on this article, we found another great way to delete swapfile.sys while preserving Pagefile.sys. To do this:

  • Run Regedit.exe;
  • Go to the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management;
  • Create a new DWORD 32-bit value with the name SwapfileControl and set it to 0;
  • Reboot your PC and check if the file swapfile.sys was deleted and pagefile.sys still exist.

Another option is to execute the following PowerShell command:

New-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management” -Name SwapfileControl -Value 0 -PropertyType DWORD -Force

How to Transfer swapfile.sys to a Different Drive

You can relocate the file swapfile.sys to another drive using a simple method. This can be used to extend the life of an SSD by transferring swap files from a mechanical hard disc.

As earlier mentioned, disable the paging file.
Use Administrator rights to run this. c:/mklink/mklink/mklink/mklink/mklink swapfile.sys k:swapfile.sys k:swapfile.sys k:swapfile.sys k:swapfile.sys k:swapfile.sys k:swapfile.sys k:
Activate paging.

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter Captcha Here :