Apart from Hibernate feature, Microsoft also offers Paging File (pagefile.sys) in Windows 11/10/8/7 to gear up or speed up Windows PC. A paging file, also known as a page file, is an additional virtual memory when your RAM fills up.
Whenever you shut down your computer or power losses, the system’s RAM is always erased; however, the page file isn’t. If you are working with some sensitive data and you’re worried about someone snooping for sensitive data that may be left in your page file, you can configure your Windows PC to erase it each time you shut down. Once you erase the page file and someone pulls the hard drive from your computer, they can’t examine the page file to find any potentially sensitive data that may have been stored in memory.
If you are not working with any sensitive data on your PC, it is not good for you to erase the page file at the PC’s shutdown. It is not recommended to erase the page file at shutdown as it will make your computer take much longer to shut down. Your shutdown time may go from a few seconds to a few minutes or even higher. It totally depends on how fast your computer’s hard drive is and how large your page file is. This is the actual reason Windows doesn’t automatically clear the page file at shutdown by default.
This post will guide you on automatically erasing the Windows Paging File at Shutdown in Windows 10/8/7. There are at least two methods through which you can erase the Windows Paging File at PC Shutdown; these are the following:-
- Erase the Windows Paging File at Shutdown using Registry Editor.
- Delete the Windows Page File at Shutdown via Group Policy Editor.
How to automatically erase the Windows Paging File at Shutdown in Windows 11/10/8/7 using Windows Registry Editor?
To automatically erase the Windows Paging File at Shutdown in Windows 10/8/7 using Windows Registry Editor, perform the following steps:-
Step 1. Start the Registry Editor by pressing
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Step 3. On the right side of Memory Management, double click the
Step 5. Click
Step 6. Close the Registry Editor window.
Now, when you shut down your computer, Windows will automatically erase the Windows Paging File or Page File.
How to automatically clear the Windows Paging File at Shutdown in Windows 11/10/8/7 using Group Policy Editor?
Note: Local Group Policy Editor (gpedit.msc) is not a part of any Windows Home edition. If you want to go through gpedit.msc in Home Edition Windows, you need to first enable the gpedit.msc in your Windows PC.
To automatically release the Windows Paging File at Shutdown in Windows 10/8/7 using Group Policy Editor, perform the following recommended steps:-
Step 1. Press and hold the
Step 2. Type the following in the Run box and hit
Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options
Step 4. On the right-side pane of the Security Options, find the “Shutdown: Clear virtual memory pagefile” policy. Double-click on it to open its setting.
Step 5. Select the
Step 6. Click
Step 7. Click
Once you complete the above steps, Windows 11/10/8/7 automatically erases the Paging File or Page File each time you shut down your PC.
If you want to prevent Windows from clearing your page file each time you shut down, on the above step 5, select the