If your storage drive is always running out of space and you’re not sure what’s eating it up, check your temporary files. They can balloon into massive storage hogs, sometimes consuming dozens of gigabytes without you realizing it.
What Exactly Are Temp Files, Anyway?
Your Windows PC creates temporary files (usually with the extension.tmp) every time you run software, install updates, or browse the internet. These files store data that programs need temporarily while performing tasks, like holding downloaded installer components, caching browser images, or saving document recovery information.
The problem starts when programs don’t have the courtesy to clean up after themselves. While Windows can self-clean temporary data periodically, applications often leave behind crash dumps, installation remnants, and cached data. This requires your manual cleanup.

On older PCs with conventional hard drives, this becomes more than a storage issue. When directories accumulate thousands of files, HDDs take longer to load that directory—you might not notice the slowdown on modern SSDs with their lightning-fast random-access speeds, but mechanical drives struggle with the extra overhead.
Windows Update creates some of the biggest offenders. After major updates, Windows creates folders likeWindows.oldorWindows-BT, hogging 20GB or more. These contain your previous Windows installation files for rollback purposes. While that safety net sounds useful, it’s consuming valuable space long after you’ve confirmed the update works fine.

The Easiest Way to Delete Temp Files
Windows has a built-in Disk Cleanup utility to help you remove temporary and other unnecessary files without deleting anything important. To launch the tool, clickStart, typedisk cleanup, and open it from the search results.
Next, select your primary drive and clickOK. It scans your selected drive for unwanted files and shows you all the files that you can safely delete. This includes temporary files, Windows Update cleanup, and thumbnails that are selected by default. If they aren’t, manually select theTemporary filesoption underFiles to delete.

For a more thorough cleaning, clickClean up system files, select your drive, and clickOK. This shows additional files like previous Windows installations and system error memory dump files. Also, unlike manual deletion, Disk Cleanup won’t remove any files currently in use by open apps.
After selecting the files, clickOKand then clickDelete filesto confirm the action.

You Can Also Manually Delete These Files
If the disk cleanup fails to remove the temp files,you can also clear temp files manually. PressWindows+R, type%temp%, and hitEnterto open your usertempfolder in File Explorer.
PressCtrl + Ato select all the files, then hitDelete. Windows will notify you if it can’t delete any files currently in use; simply clickSkipto continue.

There’s another temp folder atC:\Windows\Tempthat accumulates system-level temporary files. You’ll need administrator privileges to clean this one, though. To delete the files, pressCtrl + Ato select everything, delete what you can, and skip anything you can’t delete.
While the manual method allows you to force-delete temporary files, it requires caution. Never delete files you aren’t sure about. Also, stick to the known temp locations like%temp%for your user account andC:\Windows\Tempfor system files.
Don’t delete thePrefetchfolder, as deleting it won’t free up any meaningful storage. It contains data Windows uses to speed up program launches, so deleting it can slightly slow down app launches until Windows rebuilds the files.
Set Up Automatic Temp Files Cleanup Using Storage Sense
In Windows 11, you canset up automatic PC cleanup using Storage Sense. This Windows feature monitors your storage drives and removes unnecessary files to free up space when enabled.
To enable it, go toSettings > System > Storage, then clickConfigure Storage SenseunderStorage management. Now select theCleanup of temporary filesoption.
Next, toggle theAutomatic User content cleanupswitch to turn it on. Additionally, choose how frequently you want Windows to run Storage Sense and whether to delete files in the Recycle Bin and downloads folder. Leave them as default/never, if you aren’t sure.
You can exclude files from OneDrive that haven’t been opened recently to free up local space, while keeping them accessible in the cloud. Storage Sense can also handle those massive Windows Update files automatically, deleting them once the 10-dayGo backoption expires and you can no longer roll back the upgrade.
Setting up Storage Sense takes five minutes, but it can save you hours of manual maintenance. It’s particularly valuable if you’re running Windows on a smaller SSD where every gigabyte counts. The tool runs quietly in the background, only springing into action when your specified conditions are met.
A 10-minute PC cleanup can save you from running out of storage spaceand scrambling to delete files when you need them most. Whether you choose manual deletion, Disk Cleanup, or automated Storage Sense, regularly clearing temp files keeps your PC running smoothly and gives you a bit more breathing room on your drive.