Pagefile.sys acts like virtual RAM, which Windows uses as RAM to store unused programs, putting less pressure on the actual RAM. The size of the swap file is usually close to the size of your actual RAM, so it can take up a lot of space depending on your RAM. If you set the swap file to delete with shutdown, you will save hard drive space in exchange for slightly extending your downtime. Here’s one way the system can automatically delete the stopped pagefile.sys file in Windows 10.
To configure this, you will make changes to the Windows registry. It should be safe, but to be super safe, you should back up your Windows 10 registry before you start.
1. Open the Windows 10 registry editor by pressing To win+ R, then entering
regedit in the box.
2. In the registry editor, go to:
3. Click on “Memory management”, then double-click on “ClearPageFileAtShutDown” in the right panel.
4. Set its value to “1” and restart the PC. Each time you turn off your PC, the swap file will be deleted. Don’t worry, it will be recreated when needed.
If this tip gave you some confidence in the Windows registry, you can find that and more in our list of Windows registry hacks. We also have a guide on how to change another user’s registry in Windows 10.
Is this article useful?