top of page

How to Clear the Pagefile at shutdown on Windows 10, 8.1 and 7

Your computer has two types of memory, RAM (Random access memory) also known as physical memory and Virtual memory, also known as the Pagefile.sys uses part of your hard drive to effectively expand your RAM, allowing you to run more programs than it could otherwise handle. In a nutshell, when physical memory (RAM) is not enough to fit all the running programs, Windows automatically move some load to Virtual memory. Those files are saved on your local hard drive as Pagefile.sys & they are managed by Windows itself.

Pagefile.sys is a file created and used by Windows to manage memory usage. It’s located at C:\pagefile.sys by default, but you won’t see it unless you tell Windows Explorer not to hide protected operating system files.
  1. Open file explorer using Windows + I keyboard shortcut,

  2. Click on file then change folder and search options,

  3. Now, On the View tab, uncheck “Hide protected operating system files (Recommended).”

  4. Go to local disk C. You should easily see the pagefile.sys.

Hide protected operating system files

Advantages of Virtual Memory:

  1. It allows more applications to be run at the same time.

  2. It allows larger applications to run in systems that do not have enough physical RAM alone to run them.

  3. Provides a way to increase memory which is less costly than buying more RAM.

  4. Provides a way to increase memory in a system that has the maximum amount of RAM that its hardware and operating system can support.

Disadvantages of Virtual Memory: 

  1. It does not offer the same performance as RAM.

  2. It can negatively affect the overall performance of a system.

  3. Takes up storage space which could otherwise be used for long term data storage.


Can I remove pagefile.sys?

The answer is yes, but you cant delete this normally by right click and delete. Pagefile.sys is a file created and used by Windows to manage memory usage And needs to perform some special steps if you want to remove it. Here this post We’ll be discussing two methods to get rid of the paging file in your Windows 10, 8.1 and 7. or you can set it to Windows Pagefile be cleared at every shutdown or reboot.

Note: This could add a significant delay to your shutdown or reboot times as Windows basically rewrites the Pagefile with 0’s to clear it.

Clear Pagefile.sys in Windows 10

  1. Open Control Panel and search for ‘advanced system settings’

  2. Click Settings within the Performance section, which is on the Advanced tab.

  3. Now again, choose the Advanced tab in the window that opens and click the ‘Change…’ button under Virtual memory.

  4. Here uncheck “Automatically manage paging file size for all drivers” and set the option “No paging file.”

  5. You can also change the size of the file, specifying on your own.

  6. In the end, click “Apply” and “OK” and restart your PC.

  7. The pagefile.sys files should disappear from your hard drive.

Remove pagefile on windows 10

Clear Pagefile at Shutdown in Windows 10

Also, you can tweak the windows registry or apply group policy to set windows clear page file at every shutdown or restart.

Using Windows registry editor

  1. Search and run regedit from the Start Menu

  2. Navigate to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\

  3. 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

  4. Restart your computer for the changes to take effect

ClearPageFile at Shutdown

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

using group policy editor:

Note: Windows 10 Home basic edition don’t have group policy feature, for this reason, steps below are applicable to Windows 10 pro and enterprise users only.

  1. Run gpedit.msc (or run Group Policy Editor from your Domain Controller and add or edit a Group Policy)

  2. Navigate to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options on the left panel

  3. In the right panel, find and double-click on the Shutdown: Clear virtual memory page file policy

  4. In the policy settings window, select the Enabled radio option, and then click on the OK button to save the changes

  5. Restart your computer for the changes to take effect

Clear pagefile sys using Windows Group Policy

Note: To revert the changes, edit the same policy above and change the setting to Disabled, then save and reboot.

Also read:


Featured Posts
Recent Posts
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page