Watch Demo×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

How to Reduce or Delete pagefile.sys

large pagefile.sys blog banner image

Have you ever noticed a surprisingly large file named pagefile.sys lurking within your computer’s storage? You’re not alone. Many Windows users have been left perplexed about the purpose of pagefile.sys and, more importantly, how to manage it effectively without undermining their system’s performance. This article will help you understand what pagefile.sys is, and why pagefile.sys is large, and how you can tame its size safely.

What is pagefile.sys?

In Windows operating systems, pagefile.sys is what’s known as a “page file” or “paging file.” It serves as an extension of your computer’s physical memory or RAM (Random Access Memory).

If you have too many programs open or you’re running a particularly hefty software application, Windows can run out of physical RAM. As a result, the operating system starts using your hard drive or solid-state drive (SSD) as additional virtual memory.

pagefile.sys acts as a “spill-over tank” to help contain spikes in RAM usage, allowing your system to handle more processes than the physical memory would normally permit. When the RAM gets full, lesser-used data is treated as overflow and moved to pagefile.sys, making room for new information in RAM.

Using pagefile.sys comes with a major caveat: reading from and writing to a hard disk or SSD is significantly slower than accessing RAM. As such, pagefile.sys can’t completely replace physical memory, but it works well enough as a stopgap measure.

Why is pagefile.sys taking up so much space?

Why is your pagefile.sys huge? There are three main reasons:

  1. High resource usage: Running multiple programs, or programs that require large amounts of resources, will make the pagefile.sys file larger, since more virtual memory is required to support them.
  2. Default settings: Windows automatically manages the size of pagefile.sys, and may allocate more space than necessary based on the available disk space and other factors.
  3. Memory leaks: Occasionally, applications don’t correctly release all the memory they use after they close, leading to an unnaturally enlarged pagefile.sys over time.

A bulging pagefile.sys might not always signify trouble — it could simply mean your computer is juggling many tasks at once. However, if you suspect something isn’t right — such as sluggish performance or vast amounts of unused RAM — then it’s a wise idea to consider steps to reduce the size of pagefile.sys.

Impact of a large pagefile.sys on system performance

When pagefile.sys swells to an excessive size, it may signal underlying issues that could impede your computer’s performance. Below are some ways that an oversized pagefile.sys could impact your workflow:

  • Drive storage consumption: If pagefile.sys continually occupies a large chunk of your storage space, this can restrict how much room you have for other content, such as software installations or personal media.
  • Performance hiccups: When tasks are swapped out from physical memory to the page file, expect delays and system slowdowns. Even the speediest SSDs lag behind modern RAM speeds significantly.
  • Increased wear on drives: Constant writing and reading from a large pagefile.sys accelerates wear on traditional hard drives and potentially diminishes the longevity of SSDs due to their finite write cycles.

What’s more, you may encounter frequent “Out of Memory” warnings, despite having plenty of unused disk space tied up in your gigantic pagefile.sys. So what can you do about these issues?

What to do about a large pagefile.sys

There are three main strategies you might consider with a large paging file: moving it, reducing its size, or deleting it (carefully).

Move pagefile.sys

Moving pagefile.sys from your system drive (usually the C: drive) to another drive could free up space on your primary drive. This can lead to enhanced performance, especially if the secondary drive has more storage or is faster (such as an SSD). While moving pagefile.sys isn’t a cure-all, it can help redistribute the impact of a large page file across your storage ecosystem.

To move pagefile.sys, follow these steps:

  1. Open System Properties by right-clicking on This PC or My Computer on your desktop, and selecting Properties.
  2. Navigate to “Advanced system settings” and click on the “Settings…” button in the Performance section.
  3. In the Performance Options window, go to the Advanced tab and click on “Change…” under Virtual Memory.
  4. Uncheck “Automatically manage paging file size for all drives”.
  5. Select the system drive with the large pagefile.sys, choose “No paging file,” and then press Set.
  6. Choose another drive where you want to move pagefile.sys.
  7. Select “System managed size” or “Custom size” as preferred and click on Set.
  8. Click OK and restart your computer for the changes to take effect.

Reduce the size of pagefile.sys

If transferring pagefile.sys isn’t an option, try experimenting with how much room pagefile.sys uses. Windows typically manages this setting automatically, but controlling it manually may be more efficient.

  1. Access the Virtual Memory settings, following steps 1 through 4 in the previous section.
  2. At the hard drive list, select your current system drive.
  3. Select “Custom size” and manually enter a lower value than what’s currently set.
  4. Confirm your actions by pressing Set, then OK.

Resizing pagefile.sys too much can impede system performance, resulting in system instability. If you want to undo your changes, go back to the Virtual Memory settings and select “System managed size,” letting Windows recalibrate the file’s size automatically.

Delete pagefile.sys (don’t)

First, know that pagefile.sys is necessary to your system. The page file serves as a crucial buffer for when your physical RAM fills up. Without it, Windows will crash rather than chug along when stretched thin in terms of memory, putting your data at risk. That’s why you should not delete it.

That said, certain scenarios may require you to delete pagefile.sys. Taking such an action should be restricted to advanced users who have in-depth command of the operating system. Also, be aware that rebooting your computer will reinstate mandatory files such as pagefile.sys anyway, making it difficult or impossible to delete the paging file permanently. 

If you’re absolutely sure you want to delete pagefile.sys, follow these steps to view the file and delete it:

  1. Make sure all open files are closed. It’s best to backup your files before you proceed.
  2. Open your File Explorer and go to the C: drive.
  3. Press Control + F1, click on View, then “Options” to view the drop-down menu.
  4. Click “Change folder and search options” 
  5. In the window that appears, click the “View” tab, and uncheck “Hide protected system operating files.”
  6. Check the radio button next to “Show hidden files, folders and drives” and click “Apply” and you’ll be able to see pagefile.sys.
  7. Right click on pagefile.sys, and select “Delete.” Depending on the size of your pagefile.sys, it may bypass the Recycle Bin and be deleted immediately. 
  8. Restart your computer.

Get support for pagefile.sys and more

Navigating the complexities of your computer’s memory, particularly pagefile.sys, demands a great deal of technical know-how. If you need more support for pagefile.sys issues and other IT fundamentals, there are a few places you can turn:

  • Instructional content available in various knowledge bases and technology blogs
  • Tech forums frequented by IT professionals and enthusiasts (such as Microsoft’s official support forum and Reddit communities)
  • Remote technical support services that can walk you through solutions step-by-step

Managing pagefile.sys doesn’t have to be difficult — and neither should be managing the system itself. NinjaOne is a powerful, flexible, and robust endpoint management software that helps IT departments control and monitor the devices being used within an organization. NinjaOne can do everything from software deployment and patch management to monitoring and alerting, helping you stay on top of all your devices.

Next Steps

Building an efficient and effective IT team requires a centralized solution that acts as your core service deliver tool. NinjaOne enables IT teams to monitor, manage, secure, and support all their devices, wherever they are, without the need for complex on-premises infrastructure.

Learn more about Ninja Endpoint Management, check out a live tour, or start your free trial of the NinjaOne platform.

You might also like

Ready to become an IT Ninja?

Learn how NinjaOne can help you simplify IT operations.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).