windows 10

Can I Delete Swapfile.sys in Windows 10?


In Windows 8.1/10 in the root directory of the system drive (by default it is C:\) in addition to already familiar to many users pagefile.sys and hiberfil.sys, you can find swapfile.sys file, which was not present in earlier versions of the Windows OS. You will be able to see it if you will enable option Show hidden file, folders and drives and disable Hide protected operating system files (Recommended) in the settings of File Explorer. Swapfile.sys is something similar to a swap file pagefile.sys, but it is used as a virtual memory for temporary storing data of universal applications (Metro Store apps). In this article we will take a closer look on whether its possible to delete Swapfile.sys in Windows 10.

swapfile.sys

Can You Delete Swapfile.sys?

In case some Modern-application is not used, it will be suspended and moved to swapfile.sys, in order to not to take up too much space in RAM and retrieve when Metro-style app is resumed by the user. There is no much of official information about swapfile.sys, but if we will take a look on the comments of Microsoft employees, a separate page file was required due to the specific architecture of universal applications. And two separate paging files simplify the job for application developers.

READ ALSO  Copy Taskbar Icons Windows 7 Sysprep

With similar objectives the pagefile and swapfile file in Windows 10, however, is different from each other by minimum requirements for disk space, a read/write processes, the ability to dynamically expand etc.

Many people wonder whether it is possible and how to delete swapfile.sys? Generally, you can do this, but it is not recommended, especially because of its control mechanisms are closely related to the main page file. And the meaning of its removal is almost there, even on small SSD-drives volume. Swapfile.sys maximum size is typically less than 256 MB, so there is almost nothing to save in case it will be removed.

Swapfile.sys file is controlled by Windows only together with pagefile.sys. If you disable the paging file for the volume, you will disable swapfile.sys too.

Note. You can disable swapfile.sys, but it is strongly not recommended and if you have any issues with the system performance after that, it is necessary to revert the changes.

How to delete swapfile.sys in Windows 10?

  1. Press Win+X and select Control Panel
    control panel swapfile.sys
  2. Select System -> Advanced system settings
    How to delete swapfile.sys in Windows 10
  3. On the Advanced tab in the section Performance press Settings button
    swapfile.sys delete
  4. Switch to the Advanced tab and press Change
    performance swapfile.sys
  5. Uncheck the checkbox Automatically manage paging file size for all drives
  6. Select drive you want to remove swapfile.sys and pagingfile.sys and choose No Paging File
    paging file swapfile.sys
  7. Press Set and OK to save changes;
  8. Reboot your Windows.
READ ALSO  How to Migrate Windows OS to SSD without Losing Data

After the system boot, files Pagefile.sys and Swapfile.sys are removed from the root of the system drive.

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 ;
    registry swapfile.sys
  • Reboot your PC and check if the file swapfile.sys was deleted and pagefile.sys still exist.

Tip. Another way to do this is to use the following PowerShell command:

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

How to Move swapfile.sys to Another Drive

There is a little trick, that allows you to move file swapfile.sys to another drive. This allows, for example, to extend SSD life due to transfer swap files on a mechanical hard drive.

  1. Disable paging file as described above
  2. Run this Administrators privileges mklink c:\\swapfile.sys k:\\swapfile.sys – where K: – the drive letter on which you want to move the file
  3. Enable paging

You may also like:

How to Convert ESD to WIM File on Windows 10 In this tutorial we will show you how to convert ESD to WIM file using Command Prompt. ESD file is a new thing within Windows 10 OS, that Microsoft is...
Sysprep Windows 10 Machine: Step by Step Guide In this article we will show you how to use PowerShell and Windows System Preparation Tool to prepare a highly customized, personal Windows 10 install...
Integrate WSUS Offline Updater with MDT 2013 to De... In this article we will show you how to install updates offline gained using WSUS Offline Updater, inside MDT 2013 task sequences to deploy fully patc...
Capture Windows 10 Image using MDT 2013 In this article we are going to show you how to capture Windows 10 image using Microsoft Deployment Toolkit 2013 (MDT 2013). Later you can use such im...
System Restore Point in Windows 10: How to Enable,... Today we will show you how to enable, create and perform a system restore point in Windows 10. Let’s get started here by clicking on Start menu. Go to...