pagefile.sys is a hidden system file that Windows uses to extend memory when RAM fills up, and to hold crash dumps when the system fails. It is often several gigabytes. You should not delete it by hand. To shrink or move it, open Advanced System Settings > Performance Settings… > Advanced > Virtual Memory > Change…, and Microsoft recommends keeping it system managed.
If you were looking at pagefile.sys because your drive is full, there are safer places to reclaim space, from Windows cleanup to duplicate files that a tool like DupeDoctor can find.
What is pagefile.sys?
Microsoft’s introduction to the page file describes a page file as “an optional, hidden system file on a hard disk.” It does two jobs:
- Extends memory. Windows moves infrequently used data out of RAM into the page file, so RAM is free for active work. Together, RAM and page files set the system commit limit, the total memory Windows can promise to apps.
- Supports crash dumps. When Windows stops with an error, it can write a memory dump using the page file, which helps diagnose the cause.
Some apps also expect a page file to exist, and Microsoft advises checking product documentation for those requirements. The file is typically found at the root of the system drive as C:\pagefile.sys, and because it is a hidden system file, File Explorer does not show it with default view settings.
Why is pagefile.sys so big?
By default, Microsoft’s page file sizing guide explains, page files are system managed: they grow and shrink based on installed RAM, how much memory apps commit, and what the crash dump setting needs.
Microsoft’s figures for the extremes:
- System-managed page files can grow up to three times physical memory or 4 GB, whichever is larger, but no more than one-eighth of the volume, when the commit charge reaches 90 percent of the limit.
- A Complete memory dump needs a page file of 1 x RAM plus 257 MB.
- The default Automatic memory dump setting starts small, and if the system crashes again within four weeks it sets the page file to the RAM size or 32 GB, whichever is smaller.
So a PC with a lot of RAM, a heavy workload or a recent crash can end up with a large page file. That is Windows doing its job.
Can I delete pagefile.sys?
Not by hand. Windows has the file open while it runs, and deleting it is not how you manage it. The supported way to remove it is to choose No paging file in Virtual Memory settings, and Microsoft’s guidance argues against that for most people:
- Some apps and services require a page file and can fail without one.
- Without enough page file space, Windows may be unable to write crash dumps.
- If you have had instability due to low memory, Microsoft recommends that you do not select No paging file.
Microsoft does note that on PCs with a lot of RAM a page file might not be needed to cover peak commit, but the page file still matters for crash dumps. To see how close you get to the limit, check the committed memory figures on the Performance tab in Task Manager.
How do I resize or move the page file?
These steps follow a Microsoft Learn troubleshooting article and work the same in Windows 11 and Windows 10:
- Search for Advanced System Settings in Windows search and select Open.
- In the Performance section, select Settings….
- In Performance Options, select the Advanced tab.
- In the Virtual Memory section, select Change….
- To let Windows decide, which Microsoft recommends, tick Automatically manage paging file size for all drives.
- To customize, clear that box, select a drive and choose System managed size, Custom size or No paging file, apply the change, and restart if Windows asks you to.
If you choose Custom size, Microsoft says to set the Initial size and Maximum size to cover the peak commit of the apps you typically run, and to make sure the disk has enough space. With a custom size, Windows no longer grows the page file automatically, so revisit it if your workload grows.
Should I move the page file to another drive?
Only if your system drive is genuinely short of space and you have a second internal drive. The trade-offs:
- Keep in mind the crash dump requirement. If you remove the page file from the system drive entirely, Windows may not be able to save a full crash dump unless a dedicated dump file is configured, which the sizing guide also covers.
- A page file on a slow drive can make heavy memory use feel slower.
A cautious middle ground is to leave a system-managed page file on C: and free space elsewhere first.
What about hiberfil.sys and swapfile.sys?
You may see two other large hidden files at the root of C:.
- hiberfil.sys is the hibernation file. Microsoft’s powercfg reference documents
powercfg /hibernate offto disable the hibernate feature, andpowercfg /hibernate /sizeto set the hiberfile size as a percentage of memory. There is also/type reduced, but Microsoft notes a reduced hiberfile only supports hiberboot, not full hibernation. Run these from an administrator prompt, and only turn hibernation off if you do not use it. See Windows 11 screen, sleep and hibernate timeouts for how hibernation fits with sleep. - swapfile.sys is commonly reported as a smaller system file Windows uses for app memory. Like pagefile.sys, leave it alone rather than deleting it.
Better ways to free disk space
Before touching memory settings, reclaim space the safe way:
- Cleanup recommendations. In Windows 11, go to Settings > System > Storage > Cleanup recommendations and review Temporary files, Large or unused files, Files synced to the cloud and Unused apps.
- Storage Sense. In Settings > System > Storage, turn Storage Sense on to clean temporary files and old Recycle Bin items automatically.
- Disk Cleanup. Search for
disk cleanupand use Clean up system files for leftovers such as old update files. - Your own files. Downloads, photos, videos and backups are usually where the real space is, and duplicates pile up there.
Do not go hunting in system folders. The big WinSxS folder, for example, looks full of duplicates but should not be cleaned by hand; see duplicate files in WinSxS: safe to delete?. For what Windows’ own tools catch and miss, see Windows cleanup recommendations vs a duplicate finder.
Find duplicate photos, downloads and backups in the folders you choose. System files are never touched.
Get it from Microsoft
How does DupeDoctor fit in?
According to its Microsoft Store listing, DupeDoctor scans folders you choose and confirms exact duplicates by content with a BLAKE3 hash, so renamed copies are caught. It also finds look-alike photos, similar videos and duplicate songs for you to review, and surfaces your biggest files and installer leftovers. Deletion always goes to the Windows Recycle Bin, at least one file in every set is kept, and the listing states that Windows system locations are protected and never touched. It is built for Windows 11 and runs offline. If you prefer a free tool, our dupeGuru alternative guide compares the options.
Frequently asked questions
Can I safely delete pagefile.sys without harming my computer?
Not by deleting the file. Change it in Virtual Memory settings instead. Choosing No paging file is possible, but Microsoft warns against it if you have had low-memory instability, and some apps need a page file.
Why is pagefile.sys on another drive so big?
Someone, or a previous setup, placed a page file on that drive, and it is system managed, so it grows with demand. Check Virtual Memory settings to see which drives have a page file and set the sizes you want.
How big should my page file be?
For most people, system managed. If you need complete crash dumps, Microsoft gives the requirement as 1 x RAM plus 257 MB.
Does disabling the page file make my PC faster?
Not reliably. With enough RAM you may notice no difference, but some apps can fail without a page file and crash dumps may not be saved. Microsoft recommends letting the system manage it.
Where do I find “Adjust the appearance and performance of Windows”?
That setting opens Performance Options, the same window used for the page file. You can reach it from Advanced System Settings by selecting Settings… under Performance; the Advanced tab holds Virtual Memory.
Try DupeDoctor
DupeDoctor is in the Microsoft Store for Windows 11. More detail is on the DupeDoctor product page.
Reclaim space from duplicate files, safely and with every deletion recoverable from the Recycle Bin.
Get it from Microsoft
Windows is a trademark of the Microsoft group of companies. DupeDoctor is not affiliated with or endorsed by Microsoft.
Last updated 23 October 2026. Published by Automata Labs, a software company in Canada.