I noticed two big (~ 2GB) files (hiberfil.sys and pagefile.sys) at the root of my C: drive and wondered what they were. I searched on google and found some interesting links, but did not find any answer on this site. I guess it would be good to have this question answered here for future reference.

Here are my questions :

  • What is the file hiberfil.sys for ?
  • What is the file pagefile.sys for ?
  • Can I safely delete these files ?

UPDATE : Thank you all, see accepted answer for best explanations and links!

link|improve this question
3  
2  
aaakkk, why do people always want to delete system files. – Moab Nov 23 '11 at 0:32
1  
@Moab : Because these files take up a lot of space on my somewhat low-capacity hard drive and I was quite concerned about this. – marcof Nov 23 '11 at 2:26
feedback

3 Answers

up vote 14 down vote accepted

hiberfil.sys : is a file used by windows when you choose to 'Hibernate' the system. Take a look at this site on how to delete it, if you won't use the Hibernate option

pagefile.sys : is the file used by windows to be your Page File, or your virtual memory swap. If you have 1 GB of RAM and want to use 2 GB as your memory, windows will create a 1 GB virtual memory in your HD and use it as needed. See this site on how to delete it.

Can you delete them? Yes, but not simply going to the Windows Explorer and removing them. Take a look at the provided links, or do some research about your windows version, to know how to delete them.

Notice that simply deleting them is not enough: you'll have to disable the hibernate option and the virtual memory use of your windows.

link|improve this answer
4  
I wouldn't remove the pagefile in Windows 7. In my experience, this leads to strange behavior. However, If you have a exorbitant amount of memory, you may try it. [This is converse from Windows XP where removing the pagefile if you had over 1GB of ram worked perfectly fine] – user606723 Nov 23 '11 at 7:02
feedback

Hiberfil.sys, as the name suggests, is the file to which Windows saves the snap shot data. Thus, the file is always equal in size to the total amount of available RAM on the computer.

To remove the file and disable hibernation.

1.Open a command prompt with administrative privileges.
2.Enter “powercfg.exe -h off”.

Pagefile.sys is the Windows paging file, also known as the file that Windows uses as Virtual Memory. And as such should not be delete.

link|improve this answer
feedback

hiberfil.sys is the hibernation file, where Windows writes the contents of your system's memory when it hibernates. I believe that should be safe to delete while your system is running, but I'd like to get confirmation from someone who knows Windows better before you do anything.

pagefile.sys is the, well, pagefile, analogous to the swap partition on Linux (if that helps at all). The system uses it for extra memory when it runs out of space in RAM (it 'pages' it out to this file, thus 'pagefile'). It's extremely (relative to RAM) slow, but usually better than running out of memory altogether. You should NOT delete this file, at least while the system is running.

Edit:-

You can control the existance and size of the pagefile, at least in XP: System Properties->Advanced->Performance/Settings->Advanced/Change.

link|improve this answer
hiberfil.sys can safely be deleted, but this will make hibernation unavailable. Windows does not create the file by itself when used, nor is it deleted afterwards. That wouldn't really help anyway, the free space gained cannot be used, or the OS will not have enough storage for hibernation. – Marcks Thomas May 27 at 10:28
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.