How to Clean Up Pagefile.Sys

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.

Windows' pagefile.sys functions as virtual memory, which allows your computer to swap information between system memory and your hard drive. Pagefile.sys doesn't need to be cleaned up to continue proper function, but it can present a security risk. Information stored in pagefile.sys can persist after rebooting your machine and may be available to knowledgeable investigators. To prevent this security breach, you can configure Windows to clear pagefile.sys when you shut down your computer. Although this heightens your security, it can also noticeably increase the shutdown time.

Advertisement

Step 1

Hold the Windows key on your keyboard and press "R" to open the "Run" dialog box.

Video of the Day

Step 2

Type "regedit" and press "Enter." If you see a security confirmation window, click "Yes."

Advertisement

Step 3

Navigate to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" in the Registry Editor. Do this by double-clicking through the folders in the left pane.

Step 4

Double click "ClearPageFileAtShutdown" from the right-hand pane. If you do not see this entry, right-click "Memory Management" from the left pane, point to "New" and select "DWORD (32-bit) Value." Type "ClearPageFileAtShutdown" and press "Enter" to create the entry.

Advertisement

Advertisement

Step 5

Enter "0" in the "Value Data" field and click "OK."

Step 6

Click the "X" at the top right of the Registry Editor to close it.

Step 7

Reboot your computer twice to clear pagefile.sys. The first reboot enables the clearing function you just configured. The second reboot actually clears pagefile.sys.

Video of the Day

Advertisement

Advertisement

references

Report an Issue

screenshot of the current page

Screenshot loading...