Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Fix Windows Created a Temporary Paging File?

· 6 min read · Home Tech

In this article
  1. What Is a Temporary Paging File?
  2. How to Check If You Have a Temporary Paging File
  3. Why Does Windows Create a Temporary Paging File?
  4. How to Remove the Temporary Paging File Safely
  5. What Happens If You Delete It Incorrectly?
  6. How to Prevent Temporary Paging Files
  7. Common Misconceptions
  8. Frequently Asked Questions

Yes, Windows can create a temporary paging file when it cannot use the regular one, usually because the system drive is low on space or the existing pagefile is corrupted. The fix is to free up disk space, then delete the temporary file and let Windows recreate a stable pagefile.

What Is a Temporary Paging File?

A paging file (also called a pagefile or swap file) is a hidden system file on your hard drive that Windows uses as virtual memory when physical RAM is full. Normally, it is named pagefile.sys and sits in the root of your system drive (usually C:). However, Windows can also create a swapfile.sys for modern apps and, in some situations, a temporary paging file with a name like pagefile.tmp or temp_pagefile.sys.

This temporary file appears when the system cannot use the regular pagefile. Common triggers include:

  • The system drive is out of space, so Windows creates a small temporary pagefile on another drive.
  • The original pagefile is corrupted or locked by a process.
  • You changed virtual memory settings and did not restart.
  • Windows is applying an update or recovering from a crash.

The temporary file is usually smaller than the real one and is deleted automatically after a reboot. But if it persists, it can cause performance issues and confusion.

How to Check If You Have a Temporary Paging File

To see all paging files, open System Properties:

  1. Press Win + R, type sysdm.cpl, and press Enter.
  2. Go to the Advanced tab.
  3. Under Performance, click Settings.
  4. Go to the Advanced tab and click Change under Virtual Memory.

Here you will see a list of drives and their paging file sizes. If you see a drive with a size but no drive letter, or a file named pagefile.tmp in the file explorer (enable “Show hidden files” and uncheck “Hide protected operating system files”), that is your temporary paging file.

You can also use Command Prompt as administrator and type wmic pagefile list /format:list to see the exact paths.

Why Does Windows Create a Temporary Paging File?

Windows creates a temporary paging file as a fallback. The most common reason is a full system drive. When the C: drive has less than a few hundred MB free, Windows cannot expand the regular pagefile, so it creates a temporary one on another drive (often D: or E:) to keep the system running. This is a safety mechanism, not a bug.

Another cause is a corrupted or fragmented pagefile. If Windows detects an issue during boot, it may rename the old pagefile to pagefile.tmp and create a fresh one. This can happen after a power failure or improper shutdown.

Finally, some third-party disk tools or antivirus software can temporarily lock the pagefile, forcing Windows to use a temporary file.

How to Remove the Temporary Paging File Safely

Before deleting anything, ensure you have enough free space on the system drive. The temporary file is not critical, but removing it incorrectly can cause a blue screen. Follow these steps:

  1. Back up any important data (always good practice).
  2. Free up space on the system drive. Delete temporary files, empty the Recycle Bin, or move large files to another drive.
  3. Open System Properties as described above.
  4. In Virtual Memory, uncheck “Automatically manage paging file size for all drives.”
  5. Select the drive that has the temporary file (often a non-system drive) and choose “No paging file.” Click Set.
  6. Select the system drive (C:) and choose “System managed size.” Click Set.
  7. Click OK and restart your computer.

After restart, check if the temporary file is gone. If it still exists, you can manually delete it:

  1. Open File Explorer and enable hidden files (View > Options > View > Show hidden files).
  2. Uncheck “Hide protected operating system files.”
  3. Navigate to the drive where the temp file is (e.g., D:\).
  4. Right-click the file (like pagefile.tmp) and delete it. If it is locked, restart in Safe Mode and delete it there.

What Happens If You Delete It Incorrectly?

If you delete the regular pagefile while Windows is using it, you may get a “Page Fault in Nonpaged Area” blue screen. That is why you should always let Windows manage the pagefile or set a custom size, then restart. Deleting a temporary file is usually safe because Windows is not actively using it, but if you delete the main pagefile.sys, the system will recreate it on the next boot.

If you delete the temporary file and the system drive is still low on space, Windows will simply create another temporary file on the next boot. The real fix is to free up space permanently.

How to Prevent Temporary Paging Files

The best prevention is to keep at least 10-15% of your system drive free. Windows needs room for the pagefile, hibernation file, and temporary files. You can also:

  • Move the pagefile to a different drive if your system drive is small, but keep a small one on C: for crash dumps.
  • Set a custom pagefile size (e.g., 1.5 times your RAM) to avoid frequent resizing.
  • Disable hibernation if you never use it (powercfg /h off in Command Prompt) to free up space equal to your RAM.
  • Run Disk Cleanup regularly (search “Disk Cleanup” in Start).

If you have 16GB or more RAM, you can set the pagefile to a fixed size (e.g., 4096 MB) to reduce fragmentation, but do not disable it entirely—some applications and Windows features expect it.

Common Misconceptions

One common myth is that a temporary paging file means your RAM is failing. That is rarely true. It is almost always a disk space issue. Another myth is that you should disable the pagefile to speed up your PC. In practice, disabling it can cause crashes in memory-heavy apps and does not improve performance for most users.

Another misconception: the temporary file is a virus. It is a legitimate Windows file, though malware can sometimes hide with similar names. Always check the file location (should be in a drive root) and the file size (should be in MB or GB, not KB). If you are unsure, run a full antivirus scan.

Frequently Asked Questions

Is it safe to delete a temporary paging file?

Yes, if it is truly a temporary file (like pagefile.tmp) and not the active pagefile.sys. Delete it after freeing up space and restarting. If the file is locked, restart in Safe Mode.

Why does my C drive have no pagefile but D drive does?

This usually happens when C: is full. Windows automatically moves the pagefile to a drive with more space. To fix it, free up space on C: and then set the pagefile to “System managed” on C: only.

Can I move the pagefile to another drive permanently?

Yes, but keep a small pagefile on C: (e.g., 800 MB) to support crash dumps. Moving entirely to another drive can cause issues if that drive is removed or fails.

How big should my pagefile be?

For most systems, 1.5 to 3 times your RAM is a safe range, but Windows’ “System managed” setting is usually fine. If you have 16GB RAM, a 4-8GB pagefile is typical.

Why does the temporary pagefile come back after I delete it?

Because the underlying cause (low disk space or a corrupted pagefile) is still there. Fix the root cause, then delete the temp file again.