What Is Pagefile.sys in Windows? Should You Delete It?

When your Windows computer is running out of storage space, you may find yourself looking for ways to free up some of it, even if they’re a bit unconventional. One of these unconventional methods you may come across is deleting the Pagefile.sys file. But before you consider deleting it, you should know what Pagefile.sys is and if you should delete it in the first place.

Here’s what you need to know.

4

What Is Pagefile.sys?

Pagefile.sys is a system file in Windows set aside for your computer’sRandom Access Memory (RAM), also known as physical memory. When your computer’s RAM begins to run out of memory, it uses the pagefile to offload data it doesn’t need, such as files and apps.

So how does your computer’s RAM decide when to offload data? Let’s use an app as an example of how this works.

Dell monitor showing Windows 10 desktop

Usually, when you minimize an app, Windows will leave it running in the background. However, it will keep its data in the RAM so it can quickly access them when needed.

Then, when you boot up a RAM-intensive app, Windows needs to make room for it within the RAM. As such, Windows will instruct your PC’s RAM to dump the minimized app’s program files into Pagefile.sys, so it can free up memory without losing data.

MacBook and a Dell laptop running ZorinOS next to each other

By default, Windows will store Pagefile.sys in the root folder of your local drive (C:).

When you need to use the minimized app again, Windows will read its data from the Pagefile.sys file. And you’ll be none the wiser that it’s compensating for its physical memory shortcomings with the help of your local drive.

firefox logo with yellow warning symbol

Reading an app’s program files from Pagefile.sys is slower than reading them from RAM. The process is even slower when you’re using a hard disk drive (HDD)instead of a solid-state drive (SDD). However, It’s faster than closing the app and then relaunching it.

How to Check the Size of Pagefile.sys

To prevent tampering with Pagefile.sys, Windows will hide it by default. If you want to see it, here’s what you should do.

As you can see, the Pagefile.sys file is quite large, which makes many people think deleting it is a good idea when they’re running out of storage space.

A Windows laptop showing the home screen after booting

Should You Delete Pagefile.sys?

One scenario where it would be reasonable to delete Pagefile.sys to save disk space is if you have a lot of RAM. That way, it can store all the data it needs to keep apps running without needing to offload them. For the average Windows user, the minimum RAM size for this would be 16GB.

If you delete Pagefile.sys and your computer runs out of physical memory, your system will start to become sluggish. If the sluggishness gets too bad, Windows itself might even crash.

Also, you might notice some apps becoming slower or crashing as well. That’s because they have nowhere to put the data they need to operate properly since your computer’s RAM is full and there is no Pagefile.sys to pick up the slack.

So unless your physical memory needs aren’t greater than your installed RAM’s capacity, we recommend leaving Pagefile.sys alone.

How to Delete Pagefile.sys

Since Windows is constantly using Pagefile.sys, it will not allow you to delete it in File Explorer directly. In fact, if you selected the file and hit theDeletekey, you will see the following message: “The action can’t be completed because the file is open in another program.”

However, there’s another method you can use to delete the file and save some disk space. To do that, follow the steps below.

When Windows boots back up, the OS will have no use for Pagefile.sys, and it will delete it from your local drive. It will also delete the Swapfile.sys along with it. If you don’t know what that file is and its importance, please read our guide onwhat Swapfile.sys is and if you can delete it.

How to Restore Pagefile.sys

If you deleted Pagefile.sys and discovered that you’re experiencing problems because of it, you can easily restore it. However, if the problems are so severe that Windows is constantly freezing or can’t even boot up properly, you should try entering Safe Mode first. To do that, please check out guides onways to boot into Safe Mode on Windows 11andwhat is Safe Mode on Windows 10.

Now, to bring back Pagefile.sys, follow the steps below:

Once your computer boots up, and you go to the folder where Pagefile.sys is located, you will see that the file has returned, along with Swapfile.sys.

How to Resize Pagefile.sys

If deleting Pagefile.sys isn’t an option for you, consider resizing it instead. Here’s how to do that:

Pagefile.sys, Demystified

Pagefile.sys is an extremely important file when it comes to keeping your Windows computer running smoothly. It helps give your PC’s RAM more breathing room when physical memory can no longer hold more data. You can delete it, but only do so when you know your computer’s RAM has enough capacity to stand on its own. If not, you’re better off just resizing Pagefile.sys so it doesn’t take up too much space.

If you’re unsure of what to do with Pagefile.sys, just leave it to Windows to handle the file and look for other ways to free up space on your storage drive.

Need to clear some room on your Windows computer? Here are the Windows files and folders that can be safely deleted to free up disk space.

These are the best free movies I found on Tubi, but there are heaps more for you to search through.

These plugins will make you wonder why you used Photoshop in the first place.

These films will leave you questioning humanity, but also wanting more.

Every squeak is your PC’s way of crying for help.

Flagship price, mid-range phone.

Technology Explained

PC & Mobile