How to Delete Pagefile.sys (And Whether You Actually Should)
You've been poking around your hard drive, spotted a massive file called pagefile.sys, and wondered what it is and whether you can get rid of it. The short answer: yes, you can delete it — but whether you should depends entirely on how your system is set up and what you're trying to achieve.
What Is Pagefile.sys?
Pagefile.sys is Windows' virtual memory paging file. When your RAM fills up, Windows offloads data it isn't actively using to this file on your storage drive, then pulls it back when needed. Think of it as overflow parking for your system's working memory.
By default, Windows places it on your C: drive and manages its size automatically. On a system with 8GB of RAM, the pagefile can range from a few hundred megabytes to well over 8GB depending on workload.
It's a hidden, protected system file, which is why you can't see it in a normal File Explorer window or drag it to the recycling bin like a regular document.
Why People Want to Delete It
The most common reasons users want to remove pagefile.sys:
- Reclaiming disk space — on a small SSD, a multi-gigabyte pagefile is noticeable
- Reducing writes to an SSD — frequent paging adds to write cycles
- Privacy concerns — the pagefile can contain fragments of data from active sessions
- Migrating to a new drive — you want a clean slate before cloning or imaging
Each of these is a legitimate reason, but each has tradeoffs.
How to Delete or Disable Pagefile.sys 🛠️
You cannot simply delete pagefile.sys while Windows is running — the OS holds an exclusive lock on the file. You need to disable it through system settings first, then let Windows remove it on reboot.
Step-by-Step: Disable the Pagefile in Windows 10 and 11
- Press Windows + R, type
sysdm.cpl, and press Enter - Go to the Advanced tab
- Under Performance, click Settings
- In the Performance Options window, select the Advanced tab
- Under Virtual memory, click Change
- Uncheck "Automatically manage paging file size for all drives"
- Select your drive (usually C:), then choose "No paging file"
- Click Set, then OK
- Restart your computer
After the restart, pagefile.sys will be gone from your drive.
Alternative: Move It Instead of Deleting It
If your goal is freeing space on your C: drive without losing virtual memory entirely, you can relocate the pagefile to a secondary drive. In the same Virtual Memory dialog, select a different drive, choose "Custom size" or "System managed size", click Set, and remove it from C:.
This keeps virtual memory functional while clearing your primary drive.
What Happens When You Delete It
| Scenario | Likely Outcome |
|---|---|
| System with 16GB+ RAM, light use | Usually fine; pagefile rarely used |
| System with 8GB RAM, moderate use | May experience slowdowns or app crashes |
| System with 4GB or less RAM | High risk of instability or out-of-memory errors |
| Running memory-intensive software (VMs, video editing) | Significant risk regardless of RAM amount |
| Windows crash dump settings enabled | Crash dumps may fail without a pagefile |
One less-obvious consequence: Windows requires a pagefile to write certain memory dump files when the system crashes. If you're troubleshooting BSODs, removing the pagefile can make diagnosis harder.
The RAM Threshold Question
The idea that "enough RAM means you don't need a pagefile" is partially true but oversimplified. Some applications explicitly check for available virtual memory — not physical RAM — before launching or allocating resources. Removing the pagefile can cause these apps to fail even when physical RAM is plentiful. This is especially common with older software and some professional creative tools.
Pagefile.sys vs. Hiberfil.sys — Don't Confuse Them ⚠️
These are two different files that often get mixed up:
- Pagefile.sys — virtual memory, always active while Windows runs
- Hiberfil.sys — stores the hibernation snapshot so Windows can resume from a powered-off state
If you're trying to free space and hibernation is what you want to disable, that's a separate process using the command powercfg /hibernate off in an elevated Command Prompt.
A Note on SSDs and Write Cycles
The concern that pagefile activity meaningfully degrades modern SSDs is largely outdated. Contemporary SSDs are rated for hundreds of terabytes of writes before wear becomes a factor — far more than typical pagefile usage would generate over years of normal use. That said, if you're working with a budget drive that has a lower endurance rating, it's a factor worth knowing.
The Variables That Determine Your Outcome
Whether deleting pagefile.sys is the right move comes down to a cluster of factors specific to your machine:
- How much physical RAM you have installed
- What operating tasks or software you run regularly
- Whether you're on a spinning HDD or an SSD
- Your drive's available space and how critical that space is
- Whether Windows crash dumps or hibernation matter to your workflow
The mechanics of removing it are straightforward. What varies considerably is how different systems — and different users — respond to running without it.