How to delete the Windows 10 paging file on every shutdown | TechRepublic (2024)

Topic — Software

Published

Written By Mark W. Kaelin

We may earn from vendors via affiliate links or sponsorships. This might affect product placement on our site, but not the content of our reviews. See our Terms of Use for details.

A simple tweak of the Windows 10 Registry file can eliminate one often overlooked security concern.

How to delete the Windows 10 paging file on every shutdown | TechRepublic (2)

Survey after survey tells us that IT professionals and decision-making executives all over the world who work in enterprises of all sizes are most often concerned about security and protecting data. Whether it is enacting draconian access authentication procedures, deploying extraordinary efforts to close security vulnerabilities, or implementing unproven artificial intelligence (AI) systems, those IT pros say something must be done to protect the huge amount of data generated by modern businesses.

One often overlooked potential security vulnerability, albeit a small one, is the existence of the Microsoft Windows 10 paging file on just about every PC in an enterprise. Typically, the paging file (pagefile.sys) takes up space on your primary hard drive and acts as a form of virtual memory for the operating system, freeing up the physical RAM for higher priority applications, drivers, files, etc. Unless you change it, the Windows 10 paging file remains on your hard drive even after shutting down.

SEE: 10 tricks and tweaks for customizing Windows 10 (free PDF) (TechRepublic)

This how-to tutorial shows you how to tweak the Windows 10 Registry file to force the deletion of pagefile.sys every time you shut down your computer, thereby removing any potential security vulnerabilities. With this method, the next time you start your Windows 10 computer, the paging file will be recreated with new data.

Disclaimer: Editing the Windows Registry file is a serious undertaking. A corrupted Windows Registry file could render your computer inoperable, requiring a reinstallation of the Windows 10 operating system and potential loss of data. Back up the Windows 10 Registry file and create a valid restore point before you proceed.

How to delete the pagefile.sys file in Windows 10

To see what your current paging file settings are, follow these steps:

1. Open File Explorer and right-click Computer.

2. Select Properties.

3. Click on Advanced system settings (Figure A).

How to delete the Windows 10 paging file on every shutdown | TechRepublic (3)

4. Click the Settings button under the Performance section and then click the Advanced tab. You should see a screen similar to Figure B. Your current settings for the Windows 10 paging file will be displayed under the Virtual Memory section. In the example, the paging file is currently set to be about 16 GB.

5. Click OK a couple of times to close those screens.

How to delete the Windows 10 paging file on every shutdown | TechRepublic (4)

6. Start the Registry file tweaking process by typing “regedit” into the Cortana search box on the Windows 10 desktop.

7. Click the entry in the search results that refer to the Registry Editor program (regedit.exe).

8. With the app open, navigate to this specific key (Figure C):

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management

How to delete the Windows 10 paging file on every shutdown | TechRepublic (5)

9. In the right-hand window, double-click the ClearPageFileAtShutdown key and change the current default value from zero (“0”) to “1” (Figure D).

How to delete the Windows 10 paging file on every shutdown | TechRepublic (6)

From this point on, until you change it back to zero (“0”), the paging file will be completely deleted on shutdown and then restarted fresh each time you start Windows 10.

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Also Read

Mark W. Kaelin

Mark W. Kaelin has been writing and editing stories about the information technology industry, software, hardware, gaming, finance, accounting, and technology geekdom for more than 30 years.

See all of Mark W.'s content

How to delete the Windows 10 paging file on every shutdown | TechRepublic (2024)

FAQs

How to delete the Windows 10 paging file on every shutdown | TechRepublic? ›

Open Group Policy Editor.

How do I delete a paging file in Windows 10? ›

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. Restart your computer.

How to disable automatically manage paging file size for all drives? ›

Choose the Advanced tab in the Performance Options dialog, and click the Change… button in the Virtual Memory section. In the Virtual Memory dialog, uncheck the “Automatically manage paging file size for all drives”.

How do I clear the virtual memory in Windows 10? ›

To reset virtual memory in Windows 10:
  1. Go to the “Start” menu and type “advanced system settings” in the search box.
  2. Click on the “Advanced” tab and then click on “Settings” in the Performance section.
  3. Select the “Advanced” tab from the Performance Options window.
  4. Click “Change” in the Virtual memory section.

Is it okay to disable paging file? ›

You should never set that setting to 'No Page File' or set a manual amount either, you should always let Windows Manage your Virtual Memory, otherwise you either may not be able to boot up windows or you may experience many problems with software such as lagging.

How do I clear Windows paging file at shutdown? ›

Open Group Policy Editor.

Windows 10 Home users will need to enable Group Policy Editor or use the registry methods above. Double-click Shutdown: Clear virtual memory pagefile. Click on Enabled. Click on OK.

Can I delete Pagefile sys from C drive? ›

These are some of the key things you need to know about Pagefile. sys. Once again, it's important to note that you should never delete this file, nor will the system allow you to. You can decrease or increase the size or move it to another drive, as shown in the demonstration.

What is the best total paging file size for all drives? ›

The Page File should be approximately 1.5 - 2 times the size of your total system memory (RAM). A computer with 4GB of RAM will need a Page File a minimum of 6GB (6144 MB) and a maximum of 8GB (8192MB).

Do I need a paging file on all drives? ›

If your computer has more than one hard drive: in order to improve system performance, the paging file should be moved to another partition on a different hard drive. In this case, the operating system will process multiple input/output requests more quickly.

How do I change the total paging file size for all drives? ›

Click the Advanced tab, and click Change under Virtual Memory. Select the drive to use to store the paging file. Select Custom size and set Initial size (MB) and Maximum size (MB). For the initial size, Microsoft recommends using the recommended value in the Total paging file size for all drives box.

How do I stop Windows from using virtual memory? ›

how to disable virtual memory
  1. Press Windows key + R to open the Run window.
  2. Type CMD to open the command prompt.
  3. Copy and paste this command: fsutil behavior set encryptpagingfile 0.
  4. Once done, restart your PC to apply the changes made.
Mar 18, 2017

What does clearpagefileatshutdown do? ›

This policy setting causes Windows to clear the paging file when the system is shut down. Depending on the size of the paging file, this process might take several minutes before the system completely shuts down. This delay in shutting down the server is especially noticeable on servers with large paging files.

Why does Windows use Pagefile instead of RAM? ›

Page files enable the system to remove infrequently accessed modified pages from physical memory to let the system use physical memory more efficiently for more frequently accessed pages.

How do I delete temporary paging files? ›

You can accomplish this by uninstalling redundant programs or removing sizable files that are no longer required. Additionally, you can utilize the Disk Cleanup tool to eliminate temporary files and other redundant data. Once you have freed up enough space, try running the program again to see if the error persists.

What is the paging file size for 8gb RAM? ›

As a rule of thumb, the paging file should be a minimum of 1.5 times the size of your installed RAM, and a maximum of 3 times your RAM size. For example, if you have 8 GB RAM, your minumum would be 1024 x 8 x 1.5 = 12,288 MB, and your maximum would be 1024 x 8 x 3 = 24,576 MB.

How do I delete an extra page in Windows 10? ›

Delete a page

On the Edit menu, click Delete Page. If you're in two-page spread view, the Delete Page dialog box will appear. Select the option you want, and then click OK.

Where is paging file in Windows 10? ›

The pagefile (sometimes referred to as page file or paging file) is a Windows system file whose full name is pagefile. sys. By default, it is located in the root directory of the system drive, typically the C: drive.

Is it safe to delete hiberfil sys? ›

Although hiberfil. sys is a hidden and protected system file, you can safely delete it if you don't want to use the power-saving options in Windows. That's because the hibernation file has no effect on the general functions of the operating system.

Top Articles
Top 10 Volume Trading Books
Nanny to Mommy: The Ultimate Lifesaver: How Short-Term Cash Solutions Can Bail You Out
Mchoul Funeral Home Of Fishkill Inc. Services
Kem Minnick Playboy
Lexi Vonn
Mr Tire Prince Frederick Md 20678
Lexington Herald-Leader from Lexington, Kentucky
Zachary Zulock Linkedin
Transformers Movie Wiki
Ssefth1203
Ladyva Is She Married
Bernie Platt, former Cherry Hill mayor and funeral home magnate, has died at 90
Tnt Forum Activeboard
Mzinchaleft
Epro Warrant Search
Airrack hiring Associate Producer in Los Angeles, CA | LinkedIn
Ruse For Crashing Family Reunions Crossword
Lowes Undermount Kitchen Sinks
Allybearloves
Spn 520211
Baja Boats For Sale On Craigslist
Craiglist.nj
Roanoke Skipthegames Com
Belledelphine Telegram
Expression Home XP-452 | Grand public | Imprimantes jet d'encre | Imprimantes | Produits | Epson France
Harrison 911 Cad Log
Summoners War Update Notes
In hunt for cartel hitmen, Texas Ranger's biggest obstacle may be the border itself (2024)
Best Laundry Mat Near Me
Used 2 Seater Go Karts
Advance Auto Parts Stock Price | AAP Stock Quote, News, and History | Markets Insider
Siskiyou Co Craigslist
Movies123.Pick
Closest 24 Hour Walmart
1-800-308-1977
How to Destroy Rule 34
Raisya Crow on LinkedIn: Breckie Hill Shower Video viral Cucumber Leaks VIDEO Click to watch full…
That1Iggirl Mega
Anya Banerjee Feet
Überblick zum Barotrauma - Überblick zum Barotrauma - MSD Manual Profi-Ausgabe
How much does Painttool SAI costs?
15 Best Things to Do in Roseville (CA) - The Crazy Tourist
Indiana Jones 5 Showtimes Near Cinemark Stroud Mall And Xd
Fluffy Jacket Walmart
Sj Craigs
Superecchll
Amourdelavie
Osrs Vorkath Combat Achievements
Download Twitter Video (X), Photo, GIF - Twitter Downloader
Latest Posts
Article information

Author: Clemencia Bogisich Ret

Last Updated:

Views: 5605

Rating: 5 / 5 (80 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Clemencia Bogisich Ret

Birthday: 2001-07-17

Address: Suite 794 53887 Geri Spring, West Cristentown, KY 54855

Phone: +5934435460663

Job: Central Hospitality Director

Hobby: Yoga, Electronics, Rafting, Lockpicking, Inline skating, Puzzles, scrapbook

Introduction: My name is Clemencia Bogisich Ret, I am a super, outstanding, graceful, friendly, vast, comfortable, agreeable person who loves writing and wants to share my knowledge and understanding with you.