Windows 7: delete swap file on shutdown
In order to delete the swap file on shutdown under Windows 7, you have to make changes in your registry or control panel. In this practical tip, we will show you both ways.
Option 1: Delete swap file on shutdown: Settings in the registry
In order for the virtual memory to be deleted on shutdown, an intervention in the Windows 7 registry is necessary:
- Press the Windows and R keys at the same time. Enter "Regedit" under "Run". This is how you get into the registry.
- Open the following folder path: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ MemoryManagement.
- Double-click the "ClearPageFileAtShutdown" entry. A new window is opening up.
- There should be a "0" here. Change the parameter to "1" and click "OK".
- Restart your computer.
Option 2: Delete swap file when shutting down Windows 7 using local policies
If you don't trust changes in the registry, follow these instructions:
- Open the "Control Panel" and click on "System and Security".
- Then look for the item "Administration". Here click on "Local Security Policy".
- A new window is opening up. In the left half, open the "Local Policies" folder and then the "Security Options" subfolder.
- In the right part of the window, look for the entry "Shutdown: Delete swap file of the virtual RAM" and open it with a double click.
- In the new window, check "Enabled" and save the entry by clicking "OK".
In our practical tips, we will also tell you how to optimize your working memory.