Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →To clear pagefile.sys when Windows shuts down, enable the Shutdown: Clear virtual memory pagefile security policy. Press Win+R, run secpol.msc, open Local Policies > Security Options, open the policy, select Enabled, and apply the change. Windows will clear the paging file during a normal shutdown; Microsoft says you do not need to restart after saving the policy.
What the setting does
Windows uses the paging file, normally C:pagefile.sys, as disk-backed virtual memory. Modified memory pages can be written there while the computer is running. Some of those pages may contain fragments of documents, credentials, encryption material, browser data, or other process information.
As an Amazon Associate I earn from qualifying purchases.
The policy controls whether Windows clears those pages during an orderly shutdown. In Microsoft’s wording, the setting determines “whether the virtual memory paging file is cleared when the device is shut down.” Clearing means Windows overwrites the paging-file contents rather than simply marking the file’s space as available.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →This is a data-remanence control. It is intended to reduce what someone could recover after the computer has been shut down and its system drive examined from another operating system or attached to another device. It is not a substitute for full-disk encryption, account protection, or physical security.
#1 Best Overall
- Disclaimer: Maximum Speed requires overclocking/PC BIOS adjustments. Maximum speed and performance depend on system components, including motherboard and CPU
- Hand-sorted memory chips ensure high performance with generous overclocking headroom
- VENGEANCE LPX is optimized for wide compatibility with the latest Intel and AMD DDR4 motherboards
- A low-profile height of just 34mm ensures that VENGEANCE LPX even fits in most small-form-factor builds
- A solid aluminum heatspreader efficiently dissipates heat from each module so that they consistently run at high clock speeds
Before you enable it
Understand the shutdown cost
Windows must overwrite the paging file, so shutdown time depends on the file’s size and the storage device’s write speed. Microsoft warns that clearing can take several minutes on large pagefiles and can make shutdown appear to hang. Its example says that a computer with 2 GB of RAM and a 2-GB paging file can take more than 30 minutes to shut down when the policy is enabled. That figure comes from Microsoft policy documentation published in 2016/2017, not a guarantee for every system.
Microsoft’s current 2026 shutdown-troubleshooting guidance also lists an enabled pagefile-clearing policy as a possible cause of shutdowns that stop responding for hours. A long delay is therefore often a consequence of the setting doing exactly what it was configured to do, although other blocked services or kernel problems still need investigation.
Keep the pagefile if Windows or your support process needs it
Do not delete or disable the pagefile just to avoid the shutdown delay. Microsoft explains that Windows’ commit limit combines physical RAM with pagefiles. Pagefiles can also be needed for crash dumps. A complete memory dump requires at least RAM + 257 MB of dump storage under Microsoft’s current sizing guidance.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
If your organization needs crash dumps but does not want ordinary paging directed to a normal pagefile, Microsoft documents a dedicated dump file as an alternative. That is a design decision for administrators; it is different from removing virtual-memory support altogether.
Method 1: Enable the policy in Local Security Policy
This is Microsoft’s normal graphical procedure on editions that include the Local Security Policy console.
Rank #2
- Requires overclocking/BIOS adjustments. Maximum speed and performance depends on system components, including motherboard and CPU.
- G.SKILL RipjawsV Series DDR4 U-DIMM Memory Kit, Model: F4-3200C16D-16GVKB
- Non-ECC, DDR4 U-DIMM, 288-pin, for Desktop PC & Gaming
- Includes JEDEC default profile, and Intel XMP memory overclock profile
- Do not mix memory kits. Memory kits are sold in matched kits that are designed to run together as a set. Mixing memory kits will result in stability issues or system failure.
- Sign in with an administrator account, or be prepared to provide administrator approval.
- Press Win+R to open the Run dialog.
- Enter
secpol.mscand press Enter. - In the left pane, expand Local Policies.
- Select Security Options.
- In the right pane, locate Shutdown: Clear virtual memory pagefile.
- Open the policy, choose Enabled, and select Apply followed by OK.
- Close Local Security Policy.
The setting takes effect without a restart. The next normal shutdown will clear the paging file. A forced power-off, unplugging the machine, or a power failure does not provide the same orderly shutdown operation.
If the policy is missing
Local Security Policy is not exposed in every Windows edition. On managed computers, the setting may also be controlled by domain Group Policy. Microsoft’s policy reference places it at Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options. If a domain administrator manages the computer, a later policy refresh can replace a local choice, so ask the administrator to configure the effective domain policy instead of relying on a local edit.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Method 2: Check or change the registry value
The policy is represented by a registry value at:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerMemory Management
The value is a REG_DWORD named ClearPageFileAtShutdown.
| Value | Meaning |
|---|---|
0 |
Pagefile clearing disabled |
1 |
Pagefile clearing enabled |
Inspect the current state
- Press Win+R, type
regedit, and press Enter. - Approve the administrator prompt.
- Navigate to
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerMemory Management. - Find
ClearPageFileAtShutdownand read its data.
Export the Memory Management key before changing anything. A direct registry edit is an administrative change, and a domain policy can overwrite it. Use the policy editor where it is available; use the registry primarily to verify state or to manage a system through an established administrative process.
Change the value directly
- In Registry Editor, double-click
ClearPageFileAtShutdown. - Choose Decimal if you want to enter an easy-to-read number.
- Enter
1to enable clearing or0to disable it. - Select OK, then close Registry Editor.
The registry mapping documented by Microsoft is the same as the policy mapping. There is no need to create a second value if the named value already exists. If it is absent, use the policy interface or follow your organization’s standard registry-management procedure rather than guessing at additional settings.
Rank #3
- Compatible with select DDR4 Desktop computers + Easy to install at home, no expertise required
- Maximize your system's performance, boost loading speeds and multitask with ease
- Backed by A-Tech's Lifetime Warranty + Friendly tech support team available to help before and after your purchase
- 16GB RAM Kit ( 2 x 8GB Modules ) | DDR4 DIMM 288-Pin | Speeds up to 2666MHz (2667MHz), PC4-21300 / PC4-2666V
- NON-ECC Unbuffered | 1Rx8 or 2Rx8 - Single or Dual Rank | JEDEC DDR4 standard 1.2V
What happens during shutdown
With the policy enabled, Windows processes the pagefile-clearing operation as part of a normal shutdown. It overwrites the paging-file pages, waits for the operation to finish, and then completes shutdown. The time required grows with the amount of paging-file space that must be processed and the sustained write performance of the disk.
A blank screen, a long “Shutting down” message, or a machine that appears inactive does not by itself prove that Windows is frozen. Interrupting power during the operation defeats the orderly-shutdown assumption and can create a separate recovery problem. If a system remains unresponsive far beyond the expected storage time, investigate it rather than repeatedly forcing power off.
Security benefits and limits
What it helps prevent
After an orderly shutdown, clearing reduces the chance that residual pages in the paging file can be inspected by someone who can remove the system drive, boot another operating system, or otherwise read the disk outside the installed Windows environment. This matters most for computers that may be lost, stolen, serviced by an untrusted party, or physically accessible to people who should not read the previous session’s data.
What it does not prevent
Microsoft explicitly warns that an attacker with physical access could bypass this countermeasure by unplugging the computer from its power source. The policy also does not erase data from other locations such as documents, application caches, hibernation data, backups, free space, or removable media. It does not protect a running or unlocked computer, and it does not replace encryption.
- Full-disk encryption: protects data at rest when the device is powered off or locked, provided keys are properly protected.
- Access controls: limit who can sign in and what they can read while Windows is running.
- Physical controls: reduce the chance of tampering, drive removal, or forced power interruption.
- Pagefile clearing: reduces residual data in one specific file after a normal shutdown.
Use the pagefile policy as one layer in a security design, not as a secure-erasure guarantee.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsRank #4
- Boosts System Performance:16GB DDR4 laptop memory RAM kit (2x8GB) that operates at 3200MHz to improve multitasking and system responsiveness for smoother performance
- Easy Installation: Upgrade your laptop RAM with ease—no computer skills required Follow step-by-step how-to guides available at Crucial for a smooth, worry-free installation
- Compatibility Guaranteed: Ensure seamless compatibility with your laptop by using the Crucial System Scanner or Crucial Upgrade Selector—get accurate recommendations for your specific device
- Trusted Micron Quality: Backed by 42 years of memory expertise, this DDR4 RAM is rigorously tested at both component and module levels, ensuring top performance and reliability
- ECC Type = Non-ECC, Form Factor = SODIMM, Pin Count = 260-pin, PC Speed = PC4-25600, Voltage = 1.2V, Rank and Configuration = 1Rx16, 1Rx8 or 2Rx8
Choosing the right setting for your computer
| Situation | Usually reasonable approach | Main trade-off |
|---|---|---|
| Physically exposed kiosk, field device, or high-security workstation | Enable the policy and test shutdown behavior | Shutdown can become substantially slower |
| Interactive desktop with frequent restarts | Consider leaving it disabled and rely on encryption and physical controls | Residual pages remain until overwritten by normal system activity |
| Server with strict uptime or maintenance targets | Measure the delay during a maintenance window before enabling | Long shutdowns can disrupt operations |
| System that requires complete memory dumps | Retain adequate dump storage or design a dedicated dump file | Storage and configuration complexity remain necessary |
The decision should weigh three things: residual-data exposure, acceptable shutdown time, and diagnostic requirements. A policy that is technically enabled but routinely bypassed with forced power-offs may not deliver the intended protection.
Troubleshooting slow or apparently stuck shutdowns
Shutdown became slow immediately after enabling the policy
- Confirm that
ClearPageFileAtShutdownis set to1. - Check the configured pagefile size in Windows’ virtual-memory settings.
- Compare the delay with the storage device’s sustained write performance.
- Allow a complete shutdown once before concluding that the machine is frozen.
A large pagefile on slower storage can make the delay predictable and repeatable. Reducing the pagefile solely to shorten shutdown can affect commit capacity and dump support, so make that change only after checking workload and diagnostic requirements.
Shutdown appears to hang for hours
Microsoft’s 2026 troubleshooting guidance includes pagefile clearing among possible causes, but it also points to blocked services and kernel conditions. Check the registry or effective policy state, then review shutdown and system events, recently installed drivers, services that fail to stop, and storage errors. Do not assume every long shutdown is caused by the pagefile.
The local value says enabled, but behavior does not match
On a domain-managed computer, the effective Group Policy setting takes precedence over a local preference. Verify the applied policy with your organization’s management tools and ask the administrator which policy object is authoritative. A local registry value alone is not proof that the setting will remain in force.
You need crash dumps after enabling clearing
Keep the dump design separate from the privacy decision. Verify that the configured dump type has enough storage, remembering Microsoft’s complete-dump baseline of RAM plus 257 MB. If ordinary paging is undesirable, evaluate Microsoft’s dedicated dump-file option rather than deleting every pagefile.
How to verify the change safely
- Record the current policy or registry state before making changes.
- Enable the policy during a planned maintenance window.
- Perform one normal shutdown and measure the elapsed time.
- Start Windows again and confirm that required applications, services, and diagnostics still operate.
- Review the effective policy on managed computers after Group Policy refresh.
- If the delay is unacceptable, set the policy to Disabled or restore registry value
0, then test another normal shutdown.
Testing on the actual hardware matters because Microsoft’s “more than 30 minutes” example is tied to a specific 2-GB RAM and 2-GB pagefile configuration. Your pagefile size, disk type, encryption, storage health, and workload can produce a very different result.
Bottom line
Microsoft’s supported control is Shutdown: Clear virtual memory pagefile in Local Security Policy. Enable it at Win+R > secpol.msc > Local Policies > Security Options when reducing pagefile remnants after normal shutdown justifies the potentially long wait. Keep the pagefile and crash-dump requirements intact, and pair the setting with encryption and physical protections because it cannot defend against forced power loss or other forms of physical access.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools

