How to Delete Unused Pagefile.sys in Windows 7
Posted on 2010-11-13
I have a multi hdd (6 Tb) 64 bit Windows 7 system with 12 Gb Ram.
I also use EazFix which replaces Windows System Restore (strongly recommended). It protects my system drive by taking regular snapshots of the changes and I don't want pagefile.sys clogging up the snapshots with unnecessary data, so I move the swapfile to a volume on another hdd.
The new swapfile works (and provides a marginal performance increase by not being on the same physical unit as the system)
However, the original swapfile, which is no longer in use, refuses to disappear.
This is what we've tried so far:
1 using windows own tools to manage virtual memory, we've set the C drive to "None" (where it stll appears as such if we go back into the VMM)
2 because the pagefile.sys file did not disappear, I tried to delete with explorer
this is what we are told:
"Could not find item.
This is not longer located in C:\. Verify the item's location and try again"
3 tried using the 64 bit Lockhunter. That says that nothing is locking the file but won't touch it.
4 rebooted using a Bart PE disk. That gives me access to the drives and files without the OS getting in the way. Deleted the pagefile.sys (and the hiberfill.sys which I thought had been sorted out earlier but reappeared when viewed under Bart!) I also created a zero byte pagefile.sys with system and hidden attributes set "in case" Windows needs a "comfort" swapfile on the system drive, even though it isn't using it.
When I rebooted after (4), it had recreated pagefile.sys with the original 12gb size AND the timestamp of it's previous last use (31 October)!
the Registry, incidentally, correctly shows the real swapfile as being exactly where I want it.