How To: Delete or Clear Pagefile at Shutdown in Windows 10



Updated April 2024: Stop getting error messages and slow down your system with our optimization tool. Get it now at this link
  1. Download and install the repair tool here.
  2. Let it scan your computer.
  3. The tool will then repair your computer.

The exchange file stores the virtual memory used by the operating system when the physical memory (RAM) is insufficient to meet all running applications and system requirements. Windows 10 creates a special pagefile.sys file in the root directory of your system drive, like all previous versions of the operating system. You can delete the pagefile file when closing to increase security.

Deleting the stopped exchange file can be important if the PC is used by someone else. It is possible that the exchange file may contain sensitive data after the operating system has shut down. If you have a dual boot system or someone with physical access to your computer, data can be retrieved from this file. When Windows 10 is running, it has exclusive access rights to this file so that none of the applications can read it. However, if your entire partition is not encrypted with Windows BitLocker or similar technology, nothing protects this file if the partition of the installed operating system is accessible by booting another system. In this case, you must delete the exchange file at each stop and replace your confidential information with zeros.

Here is How Windows Clears Pagefile

When you turn off your computer, the system memory is always cleared – it is cleared when it is turned off. But it’s not the exchange file. If you are concerned that someone is looking for sensitive data that may remain in your exchange file, Windows can delete it every time it stops. It writes 0 in each bit of the exchange file and overwrites all existing data. When someone deletes the hard drive from your computer, they cannot check the exchange file to find potentially sensitive data that may have been stored in memory.

There is a real disadvantage to enabling this function. Your computer will take much longer to shut down. Your downtime can vary from a few seconds to a few minutes or even more. This depends on the speed of your computer’s hard drive and the size of your exchange file. This is why Windows does not automatically delete the exchange file when closing. It’s a compromise that most people wouldn’t want.



April 2024 Update:

You can now prevent PC problems by using this tool, such as protecting you against file loss and malware. Additionally it is a great way to optimize your computer for maximum performance. The program fixes common errors that might occur on Windows systems with ease - no need for hours of troubleshooting when you have the perfect solution at your fingertips:

  • Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
  • Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
  • Step 3 : Click “Repair All” to fix all issues.

download



Delete the file page file.sys

  1. Open the Control Panel and search for “Advanced System Settings”.
  2. In the Performance section, click Settings on the Advanced tab.
  3. Select the Advanced tab again in the window that opens and click on the’Edit…’ button under Virtual Memory.
  4. Clear the “Automatically manage pagination file size for all drivers” check box and enable the “No pagination file” option.
  5. You can also change the file size by setting it yourself.
  6. At the end click on “Apply” and “OK” and restart your PC.
  7. The swapfile.sys and pagefile.sys files should disappear from your hard disk.

Using Regedit

Start Regedit. If you are not familiar with regedit, please read our FAQ to find out how to get started.

  1. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
  2. Select ClearPageFileAtShutdown from the list on the right.
  3. Just next to it and select Change.
  4. Change the value to 1 to enable it.
  5. Restart your computer.

Using the Windows Group Policy Editor

If you are using the Pro or Enterprise version of Windows, you can use the Group Policy Editor to automatically delete the exchange file. First, locate and open gpedit.msc in the Start menu.

The above action opens the Group Policy Editor. Navigate to “Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options” on the left.

  1. Locate the right pane and double-click the Stop: File Deletion Policy button on the virtual storage page.
  2. In the policy settings window, select the Radio enabled option, then click the OK button to save the changes.
  3. Then simply reboot your system for the changes to take effect and you are ready to go. If you want to return, simply select the radio option “Off” in the Policy Settings window.

https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/shutdown-clear-virtual-memory-pagefile



Expert Tip: This repair tool scans the repositories and replaces corrupt or missing files if none of these methods have worked. It works well in most cases where the problem is due to system corruption. This tool will also optimize your system to maximize performance. It can be downloaded by Clicking Here