Delete pagefile.sys file from C drive

The pagefile.sys file in Windows is not a regular file — it’s a system-managed virtual memory (paging file) used when your RAM is full. You generally should not delete it manually, as it can cause instability, crashes, or performance issues.

That said, if you want to remove or reduce it, you need to do it through Windows settings:

  1. Open Virtual Memory Settings

    • Press Win + R, type:

      sysdm.cpl

      and hit Enter.

    • Go to the Advanced tab → PerformanceSettings.

    • In the Performance Options window, open the Advanced tab → under Virtual Memory click Change.

  2. Disable Pagefile

    • Uncheck Automatically manage paging file size for all drives.

    • Select C: drive.

    • Choose No paging file → click Set.

    • Click OK.

  3. Restart Your PC

    • After the reboot, Windows will no longer lock pagefile.sys.

    • The file will disappear automatically in most cases.

  4. If Still Visible (rare)

    • Open File Explorer.

    • Enable hidden + system files:

      • Go to ViewShow → check Hidden items.

      • Also in OptionsView tab, uncheck Hide protected operating system files.

    • Navigate to *C:* and manually delete pagefile.sys.



REFERENCES

Last updated

Was this helpful?