What pagefile.sys is and why you might want to remove it

Pagefile.sys is a hidden system file Windows creates on your hard drive to act as overflow memory. When your computer runs out of physical RAM, Windows writes data to this file instead of crashing. On most modern computers with 8 GB of RAM or more, you do not need it — your actual RAM is fast enough that the system rarely needs the pagefile, and when it does use it, the slowdown is noticeable.

Deleting pagefile.sys frees up disk space (typically 1 to 4 GB depending on your system settings) and can slightly improve performance if your drive is nearly full. However, if your computer has less than 8 GB of RAM, disabling the pagefile can cause crashes or freezing when you run memory-heavy programs. The decision depends on your hardware and how you use your machine.

Key Takeaways

  • Pagefile.sys is a virtual memory file that Windows uses when physical RAM runs low, and you can disable it entirely on systems with 8 GB of RAM or more.
  • Disabling the pagefile requires changing a setting in System Properties, not deleting the file directly — Windows will not let you delete it while it is in use.
  • After you disable the pagefile, you must restart your computer before the file disappears from your drive.
  • If your computer has less than 8 GB of RAM or you run memory-intensive software like video editing or 3D rendering, keep the pagefile enabled to prevent crashes.

How to disable the pagefile through System Properties

The correct way to remove pagefile.sys is to disable virtual memory in Windows settings, then restart. You cannot delete the file while Windows is using it. Open the Start menu and type "sysdm.cpl" into the search box, then press Enter. This opens the System Properties window directly.

Click the "Advanced" tab at the top of the window. Under "Performance," click the "Settings" button. A new window opens — click the "Advanced" tab again. Under "Virtual memory," click "Change." A dialog box appears showing your current pagefile settings. Uncheck the box next to "Automatically manage paging file size for all drives." Then select your main drive (usually C:) and select "No paging file," then click "Set." Click "OK" to confirm, then "OK" again to close the Performance Options window. Close System Properties.

Windows will ask you to restart your computer. Click "Restart Now" or restart manually later — the pagefile.sys file will not actually disappear until you restart. After the restart, the file is gone and the disk space is reclaimed.

Checking if your system can handle no pagefile

Before disabling the pagefile, know your RAM amount and what programs you run. Right-click "This PC" or "My Computer" on your desktop, select "Properties," and look for "Installed RAM" — if it shows 8 GB or higher, you are a candidate for disabling the pagefile. If it shows 4 GB or 6 GB, keep the pagefile enabled.

Even with 8 GB or more, consider what you do on the computer. If you regularly run Photoshop, Premiere Pro, 3D modeling software, or virtual machines, the pagefile provides a safety net. If you use your computer for web browsing, email, and office work, disabling it is usually safe. The worst outcome is that a program freezes or crashes — you can always re-enable the pagefile and restart if that happens.

How to re-enable the pagefile if you need it back

If you disabled the pagefile and experience crashes, freezing, or "out of memory" errors, re-enable it. Open System Properties again (Start menu, type "sysdm.cpl"), go to Advanced > Settings > Advanced > Change. Select your main drive and choose "System managed size," then click "Set." Click "OK" twice and restart your computer.

Windows will recreate pagefile.sys automatically after the restart. The process takes a few seconds and you will not see a progress bar — just wait for the system to finish booting. Your computer will return to normal behavior.

Why you cannot delete pagefile.sys directly

If you try to delete pagefile.sys by finding it in File Explorer (it is hidden by default, in the root of your C: drive), Windows will not let you. The file is locked while the operating system is running because Windows needs it as a safety mechanism, even if you rarely use it. Attempting to delete it produces a "file is in use" error.

Some people try to delete it in Safe Mode, but even that does not work reliably — the file is still protected. The only clean way to remove it is to disable virtual memory through System Properties and restart, which tells Windows to stop using the file and allows it to be deleted automatically.

What happens to your disk space after deletion

Once pagefile.sys is gone, the space it occupied becomes available for other files. On a system with 8 GB of RAM, the pagefile is typically set to 8 GB (equal to your RAM amount), so you recover roughly that much space. On a system with 16 GB of RAM, you might recover 16 GB. The exact amount depends on your system configuration and how Windows sized the file.

If your drive is nearly full and you need every gigabyte, disabling the pagefile can be the difference between having room for updates and running out of space. However, if your drive has 50 GB or more of free space, the benefit is minimal and the risk of crashes is not worth it.

Frequently Asked Questions

Will disabling pagefile.sys make my computer faster?

Slightly, but only if your drive is slow or nearly full. Pagefile access is much slower than RAM access, so if Windows is using the pagefile heavily, disabling it forces programs to use only RAM, which is faster. However, on most modern systems with adequate RAM, the pagefile sits unused anyway, so disabling it makes no practical difference to speed.

Can I delete pagefile.sys from Safe Mode?

No. The file remains protected even in Safe Mode because Windows reserves it as a system file. The only way to remove it is to disable virtual memory in System Properties and restart normally. Windows then deletes the file automatically during startup.

What if I disable the pagefile and my computer crashes?

Re-enable it immediately. Open System Properties, go to Advanced > Settings > Advanced > Change, select your drive, choose "System managed size," and restart. The pagefile will be recreated and your computer will return to normal. There is no permanent damage — you can toggle it on and off as many times as you need.

Does disabling pagefile.sys affect gaming or streaming?

Not if you have 16 GB of RAM or more. Modern games and streaming software are designed to work within available RAM. However, if you have 8 GB and run a game plus streaming software plus Discord plus a browser, the pagefile provides a buffer. Test it — if you experience stuttering or crashes, re-enable the pagefile.