The pagefile is where virtual memory that the operating system is using is stored when the physical memory (RAM) is not enough to fit all the running apps and system demands. Windows 10 creates a special file pagefile.sys in the root of your system drive. Clearing the page file on shutdown can be important if the PC is being used by another person. Here is how to clear pagefile at shutdown automatically.
Here is How to Clear the Pagefile at Shutdown using Registry Editor:
- STEP 1: At first, open the Registry Editor. To do so, just press Win+R keys, type regedit and press OK.
- STEP 2: Then go to the following Registry key. If you don’t have it – just create it.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
- STEP 3: After that, create or modify a 32-bit DWORD value ClearPageFileAtShutdown.
- STEP 4: At last, set it to 1 to clear the pagefile at shutdown.
Here is How to Clear the Pagefile at Shutdown using Local Security Policy:
- STEP 1: At first, press Win+R keys, type gpedit.msc and press OK.
- STEP 2: Then Local Security Policy Editor will be opened. Go to Local Policies \ Security Options on the left pane.
- STEP 3: At last, enable the policy option Shutdown: Clear virtual memory pagefile on the right pane as shown below.