Pagefile.sys acts as a virtual RAM, which Windows uses as RAM to store programs that are not in use, thus putting less pressure on the actual RAM. The page file size is usually near the size of your actual RAM, so it can take up a lot of space depending on your RAM. If you set the pagefile to delete with shutdown, you will save some hard drive space in exchange for slightly prolonging your shutdown time.
Here is one way you can get the system to automatically delete the pagefile.sys on shutdown in Windows 10.
Pasi de urmat
In the registry editor, go to:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Click “Memory Management,” and then double-click on “ClearPageFileAtShutDown” in the panel on the right.
Set its value to “1” and restart the PC. Every time you shut down your PC, the pagefile will be deleted. Don’t worry – it will be created again when needed.