How to Automatically Clear Pagefile at Shutdown in Windows 10

Editor Ratings:
User Ratings:
[Total: 0   Average: 0/5]

This tutorial is all about how to automatically clear pagefile at shutdown in Windows 10 PC. There are two different methods using which you can make your PC automatically clear the pagefile when you shutdown it. One of these methods is a simple registry hack which you can perform on the Registry Editor, whereas, the other method needs you to make some changes in the Group Policy Editor. If you’re aware of the term “Pagefile” then well and good, and if not then let me briefly explain it to you.

The pagefile actually works as a virtual memory in your PC, So, whenever you’re running low on RAM, some least used or unused memory pages are moved to that virtual memory to prevent program crash. Normally, when you shut down your PC, it clears out the RAM automatically but the data on the pagefile remains intact. That means the data on the pagefile are vulnerable and anyone who can get access to your PC will be able to snoop or extract data from the pagefile. In such situations, making your Windows 10 PC clear the pagefile automatically at shutdown is definitely a good idea to secure the content in a pagefile.

clear pagefile

Note: After enabling the option to clear pagefile automatically in Windows 10 PC, it will increase the shutdown time of your PC.

How to Automatically Clear Pagefile at Shutdown in Windows 10 using the Registry Editor:

Step 1: First, press “Windows Key + R” to open up the “Run” window and then type regedit in the input field. After that, hit the “Enter” key to open the Registry Editor.

open run

Step 2: On the Registry Editor, simply go to the following key location:

"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management"

create new key

After you find the key location, simply right-click on it and select “New → DWORD (32-bit) Value” to create a new value.

Step 3: Now, you need to name the value as “ClearPageFileAtShutdown“. After that, double-click on the value to open up the “Edit” popup window. On this window, you need to replace “0” with “1” in the “Value Data” field, as shown below.

new value

Step 4: Once you’re done doing that, simply click ok to close the window and then restart your PC to apply the changes. As soon as you do that, your Windows 10 PC will start clearing the pagefile automatically at shutdown. If you want to stop it, then simply delete the value which you have created in the Registry Editor.

How to Clear Pagefile at Shutdown in Windows 10 Automatically using Group Policy Editor:

Step 1: To get started, simply open up “Run” and then type “gpedit.msc” in the input field. Once you do that, hit “Enter” to open up the Group Policy Editor.

open run window

Step 2: Once the Group Policy Editor opens up, simply go to the following policy option: Computer Configuration → Windows Settings → Security Settings → Local Policies → Security Options.

navigate to policy

Step 3: After that, scroll through all the policies on the right and find the policy that says “Shutdown: Clear virtual memory pagefile”. Then double-click on it to open up the “Properties” window. On this window, you need to click on the option “Enabled” to activate this policy.

enable policyStep 4: After enabling this policy, simply click “OK” and then restart your PC to make changes. From this point onwards, whenever you shut down your PC, the pagefile will be cleared automatically. To deactivate this policy, simply select “Disabled” in the “Properties” window.

My Final Verdict:

If you’re looking for a simple way to make your Windows 10 PC clear the pagefile automatically at shutdown, then both the methods explained in this tutorial are probably the best options to do that. Using both the methods, I was able to automatically clear the pagefile with every shutdown on my Windows 10 PC.

I hope you find this post useful.

Editor Ratings:
User Ratings:
[Total: 0   Average: 0/5]