How to Clear Temp Files in Windows 11

Temporary files are created by Windows 11 and installed applications to store data needed during installations, updates, browsing, and everyday tasks. While these files help improve performance during normal operation, they often remain on your computer long after they’re no longer needed. Over time, temporary files can consume several gigabytes of storage space, slowing down your PC and leaving less room for important files.

Fortunately, Windows 11 includes several built-in tools to safely remove temporary files. You can use the Settings app, Disk Cleanup, Storage Sense, the Temp folders, Command Prompt, or other Windows utilities to free up disk space. Regularly deleting temporary files can improve storage availability and help maintain your computer’s overall performance.

Update Windows Drivers

In this guide, you’ll learn the best ways to clear temporary files in Windows 11.

What Are Temporary Files?

PC running slow or unstable? Do you want to update drivers?

Temporary files are short-term files created by Windows, applications, web browsers, installers, and system processes. They’re intended to be deleted automatically once they’re no longer needed, but many remain on your computer over time.

Examples of temporary files include:

  • Windows temporary files
  • Application cache files
  • Windows Update cleanup files
  • Delivery Optimization files
  • Temporary Internet files
  • Error reporting files
  • Thumbnail cache
  • DirectX shader cache

Most temporary files can be safely removed without affecting your personal documents or installed applications.

Method 1: Clear Temporary Files from the Settings App

The Settings app provides the easiest way to remove temporary files.

Press Windows + I to open Settings.

Go to System > Storage.

Repair PC

Click Temporary files.

Windows scans your computer and displays categories of removable files.

PC running slow or unstable? Do you want to update drivers?

Select the items you want to delete. Leave Downloads unchecked unless you’re certain you no longer need the files stored there.

Click Remove files, then confirm the action.

Windows deletes the selected temporary files and frees up storage space.

Method 2: Delete Files from the Temp Folder

Windows stores many temporary files inside the user’s Temp folder.

Press Windows + R.

Type:

%temp%
PC running slow or unstable? Do you want to update drivers?

Press Enter.

The Temp folder opens in File Explorer.

Press Ctrl + A to select all files.

Press Delete.

If Windows reports that some files are currently in use, choose Skip. Those files are actively being used by Windows or another application and cannot be deleted until they’re no longer needed.

Method 3: Delete the System Temp Folder

Windows also stores temporary system files in a separate location.

Press Windows + R.

Type:

temp

Press Enter.

If prompted, grant administrator permission.

Select all files and folders inside the directory.

Delete them, skipping any files that Windows says are in use.

This method removes temporary system files that aren’t required by running processes.

Method 4: Use Disk Cleanup

Disk Cleanup remains one of the most reliable utilities for removing temporary files.

Press Windows, search for Disk Cleanup, and open the app.

Select your Windows drive (usually C:).

Click OK.

Choose file categories such as:

  • Temporary files
  • Temporary Internet Files
  • Thumbnails
  • DirectX Shader Cache
  • Delivery Optimization Files

Click OK, then select Delete Files.

Disk Cleanup removes the selected items safely.

Method 5: Enable Storage Sense

Storage Sense automatically deletes temporary files without requiring manual cleanup.

Open Settings > System > Storage.

Turn on Storage Sense.

Click Storage Sense to configure its behavior.

Choose how often Windows should clean temporary files and when to empty the Recycle Bin or Downloads folder if desired.

Once enabled, Storage Sense helps keep your storage optimized automatically.

Method 6: Clear Temporary Files Using Command Prompt

Command Prompt allows advanced users to remove temporary files quickly.

Open Command Prompt.

Run:

del /q/f/s %TEMP%\*

This deletes the contents of your user Temp folder.

Some files may remain if they’re currently in use.

Method 7: Clear Temporary Files Using Windows Terminal (PowerShell)

PowerShell provides another way to delete temporary files.

Open Windows Terminal.

Run:

Remove-Item "$env:TEMP\*" -Recurse -Force -ErrorAction SilentlyContinue

PowerShell removes accessible files while ignoring those currently being used by Windows.

Method 8: Empty the Recycle Bin

Deleted temporary files continue occupying storage until the Recycle Bin is emptied.

Right-click the Recycle Bin on the desktop.

Select Empty Recycle Bin.

Confirm the deletion.

This permanently removes deleted files and frees the associated disk space.

Method 9: Remove Windows Update Cleanup Files

Windows Update files can occupy several gigabytes after updates are installed.

Open Settings > System > Storage > Temporary files.

Select Windows Update Cleanup if it’s available.

Click Remove files.

Keep in mind that removing these files may prevent you from uninstalling recently installed Windows updates.

Method 10: Restart Your PC After Cleanup

Restarting your computer helps complete the cleanup process.

Click Start > Power > Restart.

After restarting, Windows releases temporary files that were previously locked by running applications and system services.

You may recover additional storage space after the restart.

Conclusion

Temporary files are a normal part of Windows 11, but they don’t need to accumulate indefinitely. Using built-in tools such as the Settings app, Disk Cleanup, and Storage Sense makes it easy to remove unnecessary files and recover valuable storage space. For more advanced cleanup, you can manually delete files from the Temp folders or use Command Prompt and PowerShell.

Regularly clearing temporary files helps keep your computer organized, improves available storage, and can contribute to smoother overall performance. For most users, enabling Storage Sense is the easiest long-term solution because Windows automatically removes unnecessary temporary files in the background.

Frequently Asked Questions

Is it safe to delete temporary files in Windows 11?

Yes. Most temporary files can be safely removed because they’re no longer needed by Windows or installed applications.

Why can’t I delete some temporary files?

Some temporary files are actively being used by Windows or running applications. These files are automatically released after the associated process ends or after restarting your PC.

Will deleting temporary files improve performance?

Removing temporary files primarily frees up storage space. While it may improve responsiveness on systems with limited storage, the performance improvement varies depending on your PC.

Does clearing temporary files delete my personal documents?

No. Temporary file cleanup doesn’t remove your personal files unless you specifically choose folders such as Downloads or manually delete your own documents.

PC running slow or unstable? Do you want to update drivers?

GeeksDigit.Com
Logo