What to do with large files like hiberfil.sys and pagefile.sys in Windows?

Last update: 09/07/2025
Author Isaac
  • Pagefile.sys and hiberfil.sys can free up a lot of space if managed properly.
  • The size and usage of these files depends on the RAM and usage habits of the computer.
  • Its elimination or reduction is reversible, but it is important to know the implications before acting.

Large hiberfil.sys and pagefile.sys files

Have you ever wondered why your hard drive seems to be losing space without you installing anything new? If you use Windows, it is likely that the giant files called hiberfil.sys and pagefile.sys are taking up a significant portion of your storageThese files are necessary for operating system functions, but many people are unsure whether it's safe to delete, shrink, or move them to gain space.

In this article you will discover exactly what these files are for, how to manage them without unnecessary risks And, above all, what options you have, from deleting them, reducing their size, to moving them, as well as their possible consequences. We explain it step by step and in simple terms so anyone can understand it and make the best decision for their PC.

What is the pagefile.sys file?

Explanation of the pagefile.sys file

Pagefile.sys is a paging file that Windows uses as a virtual memory. Basically, when RAM runs out, the system resorts to pagefile.sys to dump some of the information there, allowing you to continue running applications even if you no longer have physical memory available. It's like having "auxiliary RAM" on your hard drive, although accessing information here is much slower than in physical memory.

This file is usually located in the root of the drive where Windows is installed (usually C:), although you can change its location if you're interested. Its size can vary from a few hundred megabytes to several gigabytes, and the system generally manages it automatically, adjusting the space it takes according to your needs.

On discs SSD modern, access to this file is less problematic than with older mechanical hard drives (HDD), However, if you really have a lot of RAM installed and never fill it up, pagefile.sys' intensive usage is significantly reduced. Because of this, many people wonder whether it's really worth leaving it active or whether it can be reduced or eliminated.

Can I safely delete pagefile.sys?

Disabling pagefile.sys is possible, and Windows actually allows you to do so, but there are some important nuances: If you have a team with 16 GB of RAM or more, and you don't usually perform extremely intensive tasks (such as professional video editing or scientific calculations), you can do without this file without major problems. However, on computers with less than 8 GB of RAM, the absence of this file can cause slowdowns or even crashes if you run out of physical memory. In this case, your system may even crash or be unable to open some applications.

  The right way to Discover Pc Serial Quantity in Home windows 10

If you decide to delete it, remember that you're not literally "deleting" it, but rather reducing its size to 0 KB or disabling virtual memory. If you ever need to re-enable it, simply follow the reverse process. In any case, It is a reversible change, but make sure that you do not need more memory than you physically have in your computer.

How to delete or reduce pagefile.sys step by step?

There are several ways to disable or reduce the size of pagefile.sys in Windows 10 and Windows 11Here are the simplest methods:

From the system properties

  • Open the settings menu by pressing the Windows + I keys.
  • Go to “System” and then “About” in the left column.
  • On the right side, click on “Advanced system settings.”
  • In the window that appears, find the "Performance" section and click "Settings."
  • In the new window, go to the "Advanced" tab and under "Virtual Memory," click "Change."
  • Uncheck the “Automatically manage paging file size for all drives” box.
  • Select each drive and select the "No paging file" option. Click "Set."
  • Accept the changes and restart your computer.

Thus, the pagefile.sys file will be inactive and will not take up space.

From the Local Group Policy Editor

If you have Windows Pro, Education, or Enterprise, you can automate deletion from the Group Policy Editor:

  • Open "Run" with Windows + R and type gpedit.msc, press accept.
  • Go to “Computer Configuration” > “Windows Settings” > “Security Settings” > “Local Policies” > “Security Options.”
  • Find “Off: Clear virtual memory paging file,” double-click it, and select “Enabled.”
  • Save and restart your computer.

This function causes that pagefile.sys is deleted every time you turn off your computer.

Microsoft Office versions and differences-0
Related article:
How to troubleshoot Office problems when opening large files: Complete and updated guide

From the Registry Editor

  • Press Windows + R and run “regedit”.
  • Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management.
  • Find the key ClearPageFileAtShutDown, edit its value and put “1”.
  • Restart your PC to apply the changes.
  How to fix slow loading speed on PS5

Always back up your registry before touching anything just in case!

How to disable automatic file compression in Windows 11-5
Related article:
How to disable automatic file compression in Windows 11

With external software: PrivaZer

Remove pagefile.sys with PrivaZer

If you prefer a more visual option, PrivaZer is a free tool This allows you to conveniently delete pagefile.sys, as well as clean up other unnecessary files. You can decide how and when to delete pagefile.sys: every time you clean up, only at the next shutdown, or every time your PC shuts down. This is very useful if you want to free up space occasionally or periodically without having to navigate through system menus.

Can I resize or move pagefile.sys?

Resize pagefile.sys

It is not mandatory to remove it if you are not sure. Another alternative is to reduce the size of pagefile.sys or even move it to another drive where you have the most free space. To do this, access "Advanced System Settings" again and go to the "Virtual Memory" section:

  • Disables automatic size management.
  • Choose “Custom Size” and enter the initial and maximum size in megabytes (for example, 4000 and 8000 MB if you have 8GB of RAM).
  • You can choose which drive to put the file on. If you move it, it's important that the destination drive is as fast (preferably an SSD) as the original, or you'll notice a drop in performance.

As a general rule, Microsoft recommends leaving pagefile.sys on the system drive. If you move the file and your computer starts experiencing problems, move it back or enable automatic management.

How to Find Large Files in Windows 10
Related article:
How to Find Large Files in Windows 10

What if your problem is hiberfil.sys?

The other big space occupant is hiberfil.sysThis file saves the RAM state when you activate hibernation in Windows, allowing the computer to "remember" everything you had open and restore it exactly the same way when you turn it back on.

It has nothing to do with pagefile.sys although both can take up a lot of space (on modern computers, hiberfil.sys (It can take up between half and almost all of your installed RAM.) If you don't use hibernation, you can safely remove it, although you will lose the hibernation option and some features like quick start.

UTF-8
Related article:
How to open CSV files in Excel with UTF-8 encoding and avoid errors

How do I delete hiberfil.sys?

  • Open the Symbol of the system as administrator (search cmd, right click, Run as administrator).
  • Write the command powercfg -h off and hit Enter.
  The 30-day minimalist challenge to transform your life

This will disable the hibernation feature and free up the space occupied by hiberfil.sys on your disk. If you ever want to restore it, run powercfg -h on. Remember that if you have hidden and system files visible, you'll see that the file disappears automatically.

Are there any consequences to deleting these files?

Remove or disable pagefile.sys Delete virtual memory. If you have a lot of RAM, you won't notice any changes, but on smaller computers, you may experience slowdowns when you fill up the physical memory. The system won't automatically expand the RAM, and if you fill it up, applications may close due to lack of resources.

Delete hiberfil.sys It only removes the ability to use hibernation and fast startup. If you use a laptop and are one of those who take advantage of hibernation, leave it. If you never use it, you'll gain several gigabytes with just that small change. In both cases, nothing is irreversible: you can re-enable both features if you need to.

How to check the size of these files?

To see how much space they're taking up, first enable the display of hidden and system files in Windows Explorer. Go to "Folder Options," the "View" tab, and select "Show hidden files" and uncheck "Hide protected operating system files." This way, you'll be able to see both files at the root of the C: drive and assess whether it's worthwhile to take action.

Leave a comment