How to Clean Windows Virtual Memory Pagefile (C:\pagefile.sys)
Location & Quick Verdict
C:\pagefile.sys
Windows uses C:\pagefile.sys as a virtual memory swap file on your SSD when physical RAM fills up or when writing crash dumps.
How Windows Manages Windows Virtual Memory Pagefile (C:\pagefile.sys) on NTFS & NVMe Drives
Windows 10 and Windows 11 maintain hidden system directories and root-level allocation files at C:\pagefile.sys to handle shell thumbnail databases, prefetcher launch traces, hibernation power states, and user-profile scratch storage. Because many of these paths are marked with +H (Hidden) or +S (System) attributes or guarded by SYSTEM ACL permissions, standard folder size scans often miss them entirely.
Over time, orphaned temporary files, stale Explorer DataCache_* buckets, and uncompacted virtual storage allocations inside C:\pagefile.sys lock up 4.0 GB – 32.0 GB of primary C: drive space. Cleaning Windows Virtual Memory Pagefile (C:\pagefile.sys) using the proper administrative method restores drive headroom safely.
# Inspect current disk footprint of Windows Virtual Memory Pagefile (C:\pagefile.sys) (Read-Only)
$target = "C:\pagefile.sys"
Get-ChildItem -Path $target -Recurse -Force -ErrorAction SilentlyContinue |
Measure-Object -Property Length -Sum |
Select-Object Count, @{Name="SizeGB";Expression={[math]::Round($_.Sum / 1GB, 2)}}
Manual Cleaning Instructions
- 1 Press Windows Key + R, type sysdm.cpl and press Enter.
- 2 Go to Advanced > Performance Settings > Advanced > Virtual Memory > Change.
- 3 Keep a system-managed pagefile on your fastest SSD, or move it to a secondary NVMe drive if C: is critically full.
Note: If Windows alerts that a file is in use or locked by a background process, close the associated task in Task Manager before deleting, or use SWEEPR Cleaner to release locked handles safely.
Sub-Folders & Cache Locations Breakdown for Windows Virtual Memory Pagefile (C:\pagefile.sys)
Modern Windows applications and system services split their disk footprint across multiple sub-directories (`Cache_Data`, `Service Worker\CacheStorage`, `Code Cache`, `GPUCache`, and `Crashpad\reports`). Review which sub-folders inside Windows Virtual Memory Pagefile (C:\pagefile.sys) are safe to purge and which files remain protected:
| Sub-Folder / Cache Location | Storage Role | Typical Footprint | Deletion Safety |
|---|---|---|---|
| C:\pagefile.sys | Primary System Scratch, Thumbnail/Icon DB or Virtual Allocation | 4.0 GB – 32.0 GB | ⚠️ System Managed |
| %LocalAppData%\Temp & C:\Windows\Temp | Orphaned Installer Extraction & Session Scratch Files | 1.5 GB – 18.0 GB | 🟢 100% Safe |
| %LocalAppData%\Microsoft\Windows\Explorer (thumbcache_*.db) | Cached File Explorer Image & Video Thumbnail Databases | 250 MB – 3.0 GB | 🟢 100% Safe (Rebuilds Automatically) |
| User Documents, Desktop & Registry Hives | Personal Files, Boot Configuration & System Certificates | Protected | 🔒 Protected — Never Touched |
Frequently Asked Questions
Is it safe to delete Windows Virtual Memory Pagefile (C:\pagefile.sys)?
Exercise caution: Never force-delete pagefile.sys. It is actively used by the Windows kernel as virtual memory overflow.
How much storage space will cleaning Windows Virtual Memory Pagefile (C:\pagefile.sys) free up?
Users typically reclaim 4.0 GB – 32.0 GB on Windows 10 and Windows 11 systems depending on update frequency and active cache retention in C:\pagefile.sys.
Why does Windows say some files in Windows Virtual Memory Pagefile (C:\pagefile.sys) are "In Use" when I try to delete them?
Active background processes (such as explorer.exe, svchost.exe, or running desktop apps) hold open file handles to current session scratch files. Skipping locked files—or letting SWEEPR Cleaner clean unlocked items automatically—is normal and completely safe.
Where is Windows Virtual Memory Pagefile (C:\pagefile.sys) located on Windows 10 and Windows 11?
It is stored at C:\pagefile.sys. You can paste that path directly into the Windows Run dialog (Win + R) or File Explorer address bar to inspect it.
Manual File Explorer vs. 1-Click SWEEPR Cleanup
| Feature | Manual Deletion | SWEEPR Cleaner |
|---|---|---|
| Locked File Handling | Fails on locked processes | Safe background release |
| Accidental Deletion Risk | Moderate (easy to delete wrong folder) | Zero (strict rules & hashes) |
| Safety Undo Rollback | None (Shift+Del is permanent) | 7-Day Automatic Rollback |
| Time Required | 10–20 minutes per app | < 60 seconds across 40+ areas |
Related Windows Cleanup Guides & Hidden Space Hogs
Clean Windows Virtual Memory Pagefile (C:\pagefile.sys) Automatically
SWEEPR Cleaner safely clears Windows Virtual Memory Pagefile (C:\pagefile.sys) along with 40+ other hidden app folders and leftover files in one click—covering up to 5 devices (Windows, Mac, Android & iOS) with a 7-day undo safety net.