Is Hiberfil.sys Safe to Delete? [Quick Removal Guide]

Most computer users with some form of knowledge quite like to keep their system running smoothly, and that includes cleaning out junk and old privacy files with tools like CCleaner to keep the hard drive clean from useless data. While looking around the root of your C drive, a couple of files you might come across which will be quite big in size are hiberfil.sys and pagefile.sys. You won’t be able to see them without showing hidden files in Windows folder options first, using a file manager or typing “C:” into the address bar to show hidden files in a web browser.

The size of these files actually will depend entirely on the amount of physical memory (RAM) there is in your computer because they are set automatically by Windows according to how much you have. If you use a large capacity hard drive for your Windows partition this won’t be a problem. But if you have an SSD or a smaller hard drive, this can become an issue when space is at a premium and these files are consuming several Gigabytes between them taking up a large percentage of available space.

Delete hiberfil.sys

So, just what are the hiberfil.sys and pagefile.sys files and how can I remove them from my system? How safe is it to delete hiberfil.sys and pagefile.sys?

Here are the answers to the questions above.

The Hibernation File (Hiberfil.sys)

Hiberfil.sys is a file the system creates for the computer to enter hibernation mode. Hibernation copies everything stored in the computer’s memory and writes it to your hard drive in the form of the hiberfil.sys file. That’s the reason why the computer is quicker when waking up from hibernation than a standard Windows boot because the computer is only loading this file back into memory. Some of you will know this is partly how Windows 8 can manage to boot faster than Windows 7 and Vista because it uses hibernate to do so.

If you have 2GB of memory, then hiberfil.sys will be around 2GB in size, big enough to copy the current contents of memory to the file. Even if you don’t intend to use the hibernation feature, hiberfil.sys will still take up this huge amount of disk space and you cannot move it to another drive, not ideal if you have a small drive or SSD and a large amount of memory. Hibernation is enabled by default in Windows and if you don’t intend to use this feature, you may as well switch it off to free up the drive space.

Turn off Hibernation in Windows XP

Hibernation can easily be disabled in windows XP and it’s simply a single option accessible through the Control Panel.

1. Go to Control Panel and run Power Options. Or right click on the Desktop and go to Properties -> Screen Saver tab -> Power.

2. Click on the Hibernate tab and uncheck “Enable hibernation“.

How to disable Windows Hibernate in XP

The hiberfil.sys file will be automatically deleted after you press OK and you’ll get back whatever hard drive space it was consuming. It will tell you how much Disk space will be saved in the window as you can see above.

Turn off Hibernation in Windows Vista, 7 and Windows 8

The hibernate feature in windows Vista and above is slightly more difficult to get at because you can’t delete it through the Power options in Control Panel. It can easily be removed however, by using one of the two methods below:

The easiest way is to download and run a Microsoft Fix It tool which has been developed just for enabling or disabling hibernation. Simply download and run the tool and depending on which one you use, the hiberfil.sys will be either created or deleted from the C drive.

Microsoft Disable Hibernation Fix ItMicrosoft Enable Hibernation Fix It

The other option is to use Windows Command Prompt.

1. Open a Command Prompt with administrator privileges by clicking on Start and typing “cmd” into search. Then hold Ctrl+Shift and press Enter.

2. Type the following:

Powercfg -h off

powercfg turn off hibernate

This will immediately disable hibernate and the hiberfil.sys will be deleted. To reverse the procedure, use “powercfg -h on”.

Changing the Size of Hiberfil.sys

By using the same Powercfg command above we can also reduce the size of the hiberfil.sys so it doesn’t automatically set itself to the same size as the amount of installed memory. Use the following command:

Powercfg -h -size {percentage number 50 – 100}

hiberfil change size

Setting the percentage to the lowest allowable of 50 will set the hiberfil.sys to half that of your installed memory, 75 to three quarters etc. Do be aware that this does come with its own issues because if you have more memory currently in use than the hiberfil.sys has been allocated, data loss and system problems will occur coming out of hibernate because it hasn’t saved the whole contents from RAM.

On Page 2 we show the solutions for dealing with the Pagefile.sys file.

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.

virtual memory change window

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.

disable auto manage page file

3. To move the page file, make sure C: is highlighted and select “No paging file”, then press Set.

disable page file on C

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.

enable page file on another drive

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.

Delete pagefile.sys

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.

53 Comments - Write a Comment

  1. Peter 6 years ago
    • Suraj 6 years ago
  2. Muhamad Sukin 7 years ago
  3. Steve 7 years ago
    • Steve 7 years ago
      • HAL9000 7 years ago
  4. Tim Clark 7 years ago
    • HAL9000 7 years ago
    • JIM CHERIYAN 3 years ago
  5. Ganesh 8 years ago
  6. Mostafa 8 years ago
    • HAL9000 8 years ago
  7. Fernando 8 years ago
  8. Benji 8 years ago
  9. Ashirvad Patnaik 8 years ago
  10. Sam 8 years ago
  11. Alex 8 years ago
  12. cengomengo 8 years ago
  13. linda Joy 9 years ago
  14. Abraham 9 years ago
    • HAL9000 9 years ago
    • Dutch Jennie ♥ 8 years ago
  15. Harsh 9 years ago
    • HAL9000 9 years ago
    • J. Robertson 7 years ago
  16. Bharadwaj 9 years ago
  17. T MALLIKARJUNA RAJU 9 years ago
  18. florin 9 years ago
  19. tb 9 years ago
  20. hamed 9 years ago
  21. hadi 9 years ago
  22. zizi 10 years ago
  23. Phiriza 10 years ago
  24. Reggie 11 years ago
  25. Julian 11 years ago
    • HAL9000 11 years ago
  26. PS 11 years ago
    • HAL9000 11 years ago
  27. PS 11 years ago
    • pramod 11 years ago
  28. Adarsh 14 years ago
  29. Avinash Badgujar 14 years ago
  30. garry 15 years ago
  31. mahs 15 years ago
  32. inchizitor 15 years ago
  33. Purush 15 years ago
  34. Tiina 16 years ago
  35. the great britain 16 years ago
  36. Gremlin 17 years ago
  37. TechGuyBou 17 years ago
  38. ma7moud 17 years ago
  39. Sakar 17 years ago
  40. phyzhoe 17 years ago

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: Your comment is subject to approval. Read our Terms of Use. If you are seeking additional information on this article, please contact us directly.