Is Hiberfil.sys Safe to Delete? [Quick Removal Guide]
The Page File (Pagefile.sys)
Pagefile.sys is a storage file on the hard drive which provides a larger virtual memory space and stores temporary data which can then be swapped in and out of physical memory (RAM). If you have 1GB or less of memory installed, the page file size will usually be around 1.5 times that figure. If you have over 1GB, the Pagefile.sys should default to the same size as the amount of installed memory.
Most knowledgeable users would recommend you DON’T disable your page file completely even if you have lots of RAM or you’re almost out of hard drive space. Many programs insist on using it whether they need it or not and things like offloading memory cached files and memory dumps need it to be there. It is advisable to have at least a token page file of 256MB to 1GB for compatibility purposes. There is a solution though if you have more than one hard drive, because unlike the hibernation file, the page file can actually be moved onto another drive quite easily.
Moving the Page File to Another Drive
1. For Windows Vista, 7 and 8, right click on Computer -> Advanced system settings -> Performance Settings -> Advanced -> Virtual memory Change. For XP right click on My Computer -> Advanced -> Performance Settings -> Advanced -> Virtual memory Change.
The Advanced window will also show the amount of memory being used for the page file.
2. The Virtual memory window itself is the same in XP and newer operating systems apart from Vista and above will have a tick box called “Automatically manage paging file size for all drives”. This will need unticking to continue.
3. To move the page file, make sure C: is highlighted and select “No paging file”, then press Set.
4. Next, select the drive you want to move the pagefile.sys to, click on “System managed size” and press Set again. Then click OK and reboot.
As you can see from the window, if you have plenty of memory (8GB+), then you can always experiment with a custom size by entering the initial size in Megabytes, and the maximum allowable size. Actually keeping these two values the same will slightly help performance as Windows will not keep enlarging and reducing the page file size which can also fragment the pagefile.sys over time.
How to turn off Virtual Memory and Remove Pagefile.sys
As stated before, we don’t recommend you completely disable the page file, but if for some reason you want to, it’s easy enough and done from the same Virtual Memory window.
1. Click on any drives in the window that have a paging file set, select “No paging file” and click the Set button. Make sure all drives have None in the size column. The changes will take effect after a reboot.
If you have very low RAM, maybe anything under 1GB, turning virtual memory off totally could be a disaster. You will notice that your computer will struggle to multi-task and running more than a few programs at once could make the system crawl.
Note: Users of Windows 8 may also notice another file in the root of the C drive called Swapfile.sys. This is another file similar to the pagefile.sys we have talked about above. The differences with this one are that it is a fixed size at 256MB and it cannot be deleted, moved to another location or reduced in size. In case you’re wondering why there’s another one of these paging files in windows 8, it’s to do with suspending and resuming the ModernUI (Metro) apps.
Hi there,
Having tried this, in Windows 10, I still get an error: unexpected error occurred. This after doing the CMD bit to open the DOS window
run cmd as an administration
command: poweecfg -h off
thank you master, nice tutorial.
What about for Windows 10?
To disable Hibernation, I meant
Yes, the same method.
J:\users\Tim\Powercfg -h -size 50
Access is denied.
You haven’t opened an administrator Command Prompt.
run command prompt as administrator
Thank so much . It is useful to know reduce the file size in the partitions.
changing pagefile location is very dangerous, this have resulted in deleting my ‘D’partition when my PC frozen and then when i restarted the whole partititon was deleted
Changing pagefile location is perfectly safe as it makes no difference what drive the file is on. The issue you had was not related to the pagefile location itself but was something else.
Nicr tutorial, just what i needed to fix that page file thing.
Hi I have moved the pagefile sys to a second internal standard hdd that only is used for data and I removed the Hybernation mode from my systems ;; saved me over 7 Gb on a small SSD hdd ;; runs a lot faster now ..
thx for the explains
Great! Thanks!
Thank you very much. Works great! My pagefile.sys was using 2.79GB–changed to 50-percent–saved valuable gigabyte-plus.
Thank you! Saved 15GB on a 128GB SSD drive.
Great help! Thanks a lot
Thanks for the help. You’re info and graphics are very good and you make it easy to follow and understand. This is often not the case!
Thanks
Thanks!
What about pagefile.sys?
The article has 2 pages…
See page 2
it says you dont have permission?
What are you doing to get that message, playing around with Hiberfil.sys, Pagefile.sys or System Volume Information??
Thanks, Raymond, for the command prompt solution to turning off hibernation. It seems to have worked. However, if anyone else gets an error message about not having privileges, I found out that you have to run command prompt as administrator. Right click the program Icon and choose “Run as administrator.” I hope this helps someone.
Thank You Raymond …saved 3gb ..
I learned many things about virtual memory and hibernate files.
Very clear information to understand.
Thank you
very usefull
thank you
Thank you .
thanks ..
You r really awesome!!! thanks.
Thank you Raymond for your help…
Thank You…..
So, I moved the pagefile.sys succesfully. It’s now on the D drive.
Can I erase without problems the pagefile.sys from my C drive?
Thanks.
Yes you can, once it’s on a new drive, the pagefile on C is of no use anymore.
Dear Mr. Raymond,
I also have tried to use the file Microsoft Fix it 50466 for diasabling the hiberfil.sys but in vain.
The message says:
The tool Microsoft Fix it cannot be used on your operating system or on your application version.
What to do?
My hiberfil.sys has 12,37 GB due to 16 GB RAM…..
Please help me to solve this problem because I am short of free space on disk C:.
Otherwise I would have to remove the Window partition, to make a bigger one and to install the new Windows 8.
Many thanks for your advice,
Ing. Pavel Sič
Even though you’re the administrator, have you tried running the command prompt as admin (right click, run as admin)? For some strange reason this sometimes works even if you already have full rights.
If that fails, try to do the same from Safe Mode, sometimes backup or security software can lock the hiberfil.sys and not allow you to delete it.
If that also fails, create a new admin account and see if you can delete from there, your current account may have a security permissions problem.
After typing C:\Users\Dragon>powercfg -h -size 50 >>> Access denied ……
After typing C:\Users\Dragon>powercfg -h off:
AN UNEXPECTED ERROR CONDITION HAS OCCURED. UNABLE TO PERFORM OPERATION. YOU MAY NOT HAVE PERMISSION TO PERFORM THIS OPERATION.
In spite of I have the administrator´s rights on the whole disk C:\, however, I have no rights to access to hiberfil.sys and pagefile.sys. I am not able to abandon the file security of the both files.
Please give me advice.
I have two Windows 8 systems on my notebook, perhaps I´ll be sucessful on the other system….
Many thanks for your kind answer
Hi PS,
create shortcut for DOS prompt on desktop then run this CMD as administrator. when you right click on this DOS shortcut you will get option “Run as Administrator”. Now you can use
Powercfg -h off
THANK YOU..!!!!!!!!!!! Really HELPED!!! :)
Thank you for this information. really helped.
thanks buddy…..
Great thanks … It’s working great !!
Thank You very much!!!
thanks raymond.
Thank you, ever so much for really helpful advices
thanks for the additional knowledge. It will help me to save space if I would not use big programs. You’re the best man! Thanks again.
Thanks for the info on that Raymond :) I’d never used hibernation before today, and needed to see what that BiG new file was related to. It’s all gone now ;)
I just wanted to add a few bits, in case it’s of interest to anybody. Photoshop shouldn’t (in theory) be affected by having no pagefile, as it uses its own ‘scratchpad’ file area. Some of my more extravagant customers I have, use a completely separate SATA drive for just that single purpose, though their fast PCs make it hard to see any notable difference. I’ve not used AutoCAD, so can’t comment on that one.
Regarding the idea of completely switching off the pagefile, I’ve played with this on a few machines, and found XP Pro seems happy with it, till it gets pushed (i have 2GB DDR2 fitted).
I think Microsoft have assumed all along that it’s a required safety net, and the system actually depends to some degree on it being available. We can see how badly Windows is setup in dealing with used memory, by its effects after copying a full CD/DVD – watch it try to wake back up even after the software is exited.
Just curious, does anybody know of a utility that wipes memory on ‘application exits’ safely? i’ve tried many, but all cause instability (or no effect) – i assume they all clean some bits of data in error maybe?
What I’d like to see, is a memory manager, to lock specific applications memory area & usage. So Windows doesn’t waste so much time shuffling & searching. If NERO (example) was locked at the 1.5Gb memory page & limited to 100Mb application use, it would be far more efficient i reckon (based on old style programming ways from years ago).
One last point (hope I’ve not ranted for too long)…… Regarding speed differences, the speed is entirely down to the individual PC, based on drive transfer capabilities, and memory speeds (EDO/DDR types etc.), and also, it’s worth mentioning that XP is naturally setup to give most physical memory up to ‘programs’, and not for the ‘system’, though this setting is changeable. I wonder if ‘system’ would include the pagefile? I will have to investigate.
Thanks again Raymond, excellent website :)
(and VISTA is so yucky, I think).
This one is a nice one.
Thank you Raymond
nice stuff
thanks raymond. at least i can free up my disk space