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 like all previous releases of the OS. You can clear the page file at shutdown for increased security. Here is how it can be done.
Clearing the page file on shutdown can be important if the PC is being used by another person. It is possible that the pagefile contains some sensitive data after you shutdown the OS. If you have a dual-boot system or someone with physical access to your computer, the data can be recovered from that file. When Windows 10 is running, it has exclusive access rights to that file, so none of the apps can read it. However if your entire partition is not encrypted by Windows BitLocker or a similar technology, nothing protects that file when the installed OS partition can be accessed by booting another system. In that case, you might want to wipe the page file on every shut down and replace your sensitive information with zeroes.
Note: Enabling this feature will cause shutdown and restart to take a little longer to finish however compared to hard disk drives, it should still be quick on SSDs.
Before proceeding, ensure that your user account has administrative privileges. Now, follow the instructions below.
To clear the pagefile at shutdown in Windows 10, do the following.
- Open Registry Editor.
- Go to the following Registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
If you do not have such a key, then just create it.
- Here, create or modify a 32-bit DWORD value ClearPageFileAtShutdown. Note: Even if you are running 64-bit Windows, you still need to use a 32-bit DWORD as the value type.
Set it to 1 to clear the pagefile at shutdown.
- Restart Windows 10 to apply the change and you are done.
Later, you can delete the ClearPageFileAtShutdown value to restore the default behavior.
Note: Enabling this on SSDs will increase the amount of data written to the SSD on every shut down or restart. The page file is usually quite large in size, so several gigabytes will be written to the SSD.
To save your time, I made ready-to-use Registry files. You can download them here:
Clear the pagefile at shutdown in Windows 10 using Local Security Policy
If you are running Windows 10 Pro, Enterprise, or Education editions, you can use the Local Security Policy app to configure the option mentioned above with a GUI.
- Press Win + R keys together on your keyboard and type:
- Local Security Policy will open. Go to Local Policies \ Security Options on the left.
- On the right, enable the policy option Shutdown: Clear virtual memory pagefile as shown below.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: