All About Technology & Troubleshooting

How to Delete or Clear Pagefile at Shutdown in Windows 10

By default, Windows automatically manages pagefile.sys file size, and, in most cases it is the best option. However, if you want to delete Remove pagefile.sys here explained how you can do that

Pagefile.sys is a part of the virtual memory and Windows uses this file as temporary storage for running programs/data. That means when the physical memory (RAM) is not enough to fit all the running apps and system demands windows move some load to Virtual memory (Pagefile.sys). The paging file is, by default in the system drive, usually here: C:\pagefile.sys. and its automatically created and maintained by Windows itself, But you can alter it manually. Even if you have plenty of memory, Windows still uses the pagefile for caching when moving or deleting a large amount of files and for other activities.

Can I remove pagefile.sys?

You are reading this article because you want to get rid of the page file to free up some valuable space on your hard drive. And the answer is yes, The pagefile.sys is found at C:\pagefile.sys, but windows must have set to show hidden files and folders. As Page file or pagefile.sys currently in use, you cant delete this normally by right click and delete.

Remove pagefile.sys

  • Open Control Panel and search for ‘advanced system settings’
  • Click Settings within the Performance section, which is on the Advanced tab.
  • Now again, choose the Advanced tab in the window that opens and click the ‘Change…’ button under Virtual memory.
  • Here uncheck “Automatically manage paging file size for all drivers” and set the option “No paging file.”
  • You can also change the size of the file, specifying on your own.
  • At the end, click “Apply” and “OK” and restart your PC.
  • The swapfile.sys and pagefile.sys files should disappear from your hard drive.

Remove pagefile sys

Clear pagefile at shutdown windows 10

As Virtual memory (pagefile.sys) play an important role in system performance, We don’t recommend to delete. But you make Windows automatically clear the pagefile with every shutdown, it will actually overwrite the existing pagefile data with “zeros” and save some valuable space on your disk drive.

How to Clear the Pagefile in Windows Group Policy

  • Press Windows + R, type gpedit.msc and ok to Group Policy Editor
  • Now on the left panel Navigate to the following path
  • Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options
  • Here In the right panel, find and double-click on the Shutdown: Clear virtual memory page file policy
  • In the policy settings window, select the Enabled radio option, and then click on the OK button to save the changes
  • Restart your computer for the changes to take effect
  • To revert the changes, edit the same policy above and change the setting to Disabled, then save and reboot.

Clear the Pagefile in Windows Group Policy

How to Clear the Pagefile in Windows Registry

  • Press Windows + R, type regedit and ok to open the windows registry editor.
  • Backup registry database then Navigate to the following key:
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\
  • If you have a REG_DWORD key called ClearPageFileAtShutdown, double-click on it and change the value to 1
  • If not, right-click and select New > DWORD (32-bit) Value and name it ClearPageFileAtShutdown and set the value to 1
  • Restart your computer for the changes to take effect

Clear the Pagefile in Windows Registry

To revert the changes, edit the same registry key above and change the value to 0, then save and reboot.

Also read:

You might also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More