Computer

Save space on your HDD or SSD by deleting the Pagefile.sys file

The paging file pagefile.sys may be completely unknown to many users, since Windows creates it internally and we are hardly going to deal with it. In the event that we have a PC with a small hard disk, with a problem that it often fills up, we may be interested in dispensing with the use of this file, or changing its size or moving it to another storage unit. All this is something that we will see next.

What is the pagefile.sys file for, can we do without it?

It is a system file that the operating system uses to store windows paging file. This file acts as if it were a virtual RAM, which Windows uses as RAM to store programs that are not in use. This way you put less pressure on the actual RAM and get faster access to them. This also causes this file to become larger and larger, occupying more and more space on our hard drive, so we may still be interested in doing without it. This file can be found within the drive C from our computer, although it is hidden. So if we want to see it, it will be necessary to activate the “Hidden elements” tab within the Windows 10 File Explorer.

It is possible to dispense with this file without any type of risk to our system, although in computers with little RAM memory we could notice slowdowns when the equipment is using all the RAM available in the equipment. For this reason, we configure this paging file so that it is eliminated, we will save some space on our hard disk, in exchange for slightly prolonging the system shutdown time. It is also possible to change its size in our operating system to reduce its impact or change it to another storage unit that we have available.

We do not have to be afraid to dispense with this file, although depending on the amount of RAM that we have in our computer, yes we can notice slowdowns when the equipment is using all the available memory, in the case that we have 8 GB or less of RAM. If we have 16 or 32 GB available, generally, we should not notice any difference, unless we are able to use all the memory of the system.

Ways to delete pagefile.sys file in Windows 10

If we want to delete the pagefile.sys file from our Windows 10 computer, we have several ways to do it. The simplest, from the Control Panel we will have quick access. For the more advanced it is also possible to delete it using the Group Policy Editor and the Registry Editor.

Use the Settings menu

It is possible to delete the pagefile.sys file from the system properties, from where we can access the Settings menu, by pressing the Windows + I keyboard shortcut. Once inside, click on the “System” tab.

Configuration and system

Later, in the left column, at the bottom, click on «About», and on the right side we click on «Advanced system settings».

Advanced system settings

This will open a small window for us. Here, in the “Performance” section, click on “Settings” and a new window will appear.

System Properties Configuration

In this new window we will go to the “Advanced options” tab and in the “Virtual memory” section, click on the “Change” button.

Performance options and advanced options

This will make another window appear again, where at the top we have the “Automatically manage paging file size for all drives” box checked. We uncheck this so that the rest of the options are enabled. Now we mark all the hard drives that we have connected to the computer and within the “No paging file” section, click on “Set”. This will delete the pagefile.sys file and it will take up 0 KB of space.

Setting set without paging file

Use Local Group Policy Editor

In the case that we use a Pro or Enterprise version of Windows 10, we can use the Local Group Policy Editor to delete the Pagefile.sys file automatically. To do this, we use the keyboard shortcut “Windows + R”, to launch the Run command, where we must write gpedit.msc and click on «OK».

Once we have accessed the “Local Group Policy Editor”, in the left column click on “Computer Configuration” and display the Windows Configuration folder. Then we click on “Security Settings”. Next, in the right column we double click on «Local Policies» and double click on «Security Options». Now in the right panel, we must find and double click on the section of «Off: Clear paging file from virtual memory«.

Clear the paging file from virtual memory

This will open a new configuration window within the Local Group Policy Editor, where we must mark the option of “Enabled” and click on «OK» to save the changes. Now we only have to restart the system for the changes to take effect. If at any time, we want to go back, we simply have to carry out the same steps and click on the Disabled button.

Enable clearing of paging file

From the Registry Editor

Lastly, we can also use the Windows 10 Registry Editor to delete the pagefile.sys paging file. To do this, we will press the keyboard shortcut Windows + R to launch the Run command. Here we must write “Regedit” and click OK.

Once the Windows 10 Registry Editor appears, we must navigate to the following path:

HKEY_LOCAL_MACHINE / SYSTEM / CurrentControlSet / Control / Session Manager / Memory Management

Once we see the content of this folder in the right panel, we must double click on the file ClearPageFileAtShutDown. This will open a new window, where we must set 1 as value data and press «OK» to save the changes. Finally, we restart the PC for the changes to take effect. From now on, every time we turn off the computer, the paging file will be deleted.

Edit ClearPageFileAtShutDown value data

Delete pagefile.sys file with PrivaZer

Another option we have available to delete the pagefile.sys file is to use an application like PrivaZer developed to safely clean our computer.

It is a tool that will help us to clean our PC, cleaning unwanted traces from both the operating system as of the programs that we have used. For this, it is responsible for deleting old files that have been saved on our hard drive. This application has more than 100 analysis and cleaning functions, among which is the possibility to delete the Pagefile.sys file. We can download it for free and in a portable version from its website.

Once we execute it, its main menu appears, where we must click on “Advanced Options” in the left column.

PrivaZer Advanced Options

A new window will appear, where we must click on the “Memory” tab. Here we see the section of Pagefile.sys where it gives us the option to delete it in three different ways: “After each cleaning with PrivaZer”; “Only at the next PC shutdown” and “Every time the PC is shut down”.

PrivaZer delete pagefile

Resize pagefile.sys or move it to another drive

We may not consider it necessary to delete the peafile.sys file, so we can also use other solutions such as the possibility of changing its size or moving it to another unit, in case we have more than one hard disk, and we have of more storage space.

Change file size

If we want, we can choose to change the size of the pagefile.sys file manually. To do this, we must access the “Advanced system configuration”, from the “Configuration” and “System” menu. Within the section “Performance Options” and “Virtual Memory” we have the possibility to change the size of this system file. Here, we must have deactivated the “Automatically manage paging file size for all drives” option. Then, we can choose between the option to deactivate the option to Automatically manage the size or opt for the «Custom size», which will allow us to choose a desired size to our liking, establishing an initial size (in MB) and a maximum size.

Virtual memory set custom size

When establishing these values ​​we must take into account a differential factor such as the amount of RAM we have in our computer. Currently, it is to have at least 8 GB of RAM, to be able to move Windows 10 with ease, so in this case we can assign 4000 MB for the initial size and 8000 MB as the maximum size. It is not something that we assign obligatorily since each user can set the value they consider necessary.

Move the file to a different drive

If the pagefile.sys file takes up too much space, the possibility of change it storage space within our system. This is something that we also do within the Virtual Memory section belonging to the advanced configuration of the system. Here, at the top, we find a table showing the different storage units that we have available. Select the “C drive” and click on the “No mapping file” box and finally click on the “Set” button.

Set C drive without paging file

Next, we are going to select the drive where we want to move the data from the pagefile.sys file. Later we will select the option “Size managed by the system” and finally, click on the Set button and OK to save the changes. Now we only have to restart the PC so that the changes are applied.

Set drive D as system managed size

Related Articles