Quick answer: Go to Start > Settings > System > Storage > Temporary files, select the types of files you want to remove and select Remove files. Leave Downloads and Recycle Bin unselected unless you’ve checked them, because those hold your own files. To clear temporary files on a schedule, turn on Storage Sense on the same page. You can also press Windows key + R, type %temp% and delete what’s inside that folder; Windows can’t remove files that are still in use, so choose Skip for those.
In this guide
Applies to: Windows 11, on the drive where Windows is installed. Microsoft’s storage pages cited here also list Windows 10, but the steps follow Windows 11. This guide covers temporary files only. If you need more room than that frees, the guide to freeing up disk space in Windows 11 goes through apps, OneDrive, large personal files and other options.
Temporary files are working copies that Windows and apps create while they run: setup leftovers, cached data, logs and similar items. They are meant to be short-lived, but they aren’t always cleaned up, so they can build up over time. Deleting them is generally safe as long as you stick to the temporary file categories and folders below and leave your own files alone.
1. Delete temporary files in Settings
This is the simplest route, because Windows lists the categories for you; check the warning below before you select anything. The steps below follow Microsoft’s Manage drive space with Storage Sense page:
- Go to Start > Settings > System > Storage.
- In the list that shows how the drive is used, select Temporary files. Windows may take a moment to work out how much space each type uses.
- Select the types of files you want to remove. Each one shows how much space it takes.
- Select Remove files and confirm if asked.
Warning: not everything on this list is temporary in the everyday sense. Downloads is your Downloads folder, and Recycle Bin holds files you deleted but may still want back. Leave both unselected unless you’ve checked what’s in them. If you can’t empty the Recycle Bin because Windows says it’s corrupted, see how to fix a corrupted Recycle Bin.
Previous Windows Installation(s) may also appear here after an upgrade. Microsoft’s Storage Sense page notes that removing it deletes the Windows.old folder, and Microsoft’s Free up drive space in Windows page warns that you can’t go back to the earlier version once it’s gone. Keep it if the new version is giving you trouble. The guide to deleting Windows.old explains the trade-off in more detail.
Settings also has Cleanup recommendations on the same Storage page, which groups temporary files with large files and unused apps. Microsoft points out that it can include the previous version of Windows as a system file you can delete within 10 days of an upgrade, so check each item before you select Clean up.
2. Let Storage Sense delete them automatically
If you’d rather not repeat method 1 every few weeks, Storage Sense can handle temporary files for you. According to Microsoft’s Manage drive space with Storage Sense page, you turn it on like this:
- Go to Start > Settings > System > Storage.
- Set Storage Sense to On.
- Select Storage Sense itself to open its options and choose how often it runs.
The same page lists options for the Recycle Bin, the Downloads folder and cloud files. Microsoft says the Downloads folder and cloud content aren’t touched unless you set them up, so if you only want temporary files cleared, leave those options alone. A few limits are worth knowing, all from Microsoft’s page:
- Storage Sense works only on the system drive.
- Its settings apply to the signed-in user only; other people on the PC set their own.
- It runs only when you’ve been signed in and online for more than 10 minutes, so it won’t clean up while you’re signed out.
- It’s off by default, but if the PC runs low on space and you haven’t used it before, Windows may turn it on to manage some temporary files and then notify you.
3. Use Disk Cleanup
Disk Cleanup is the older desktop tool for the same job, and it puts the choices in a single window. It isn’t described in the Microsoft pages used for this guide, so treat these steps as a general outline; the tool may look different, or be missing, in some versions of Windows 11. The Settings route in method 1 does the same work.
- Select Start, type Disk Cleanup and open it. You can also press Windows key + R, type
cleanmgrand press Enter. - If asked, choose the drive Windows is installed on and select OK.
- Select the check boxes for the items you want to remove, such as Temporary files and Temporary Internet Files. Selecting an item shows a short description of it below the list.
- To include system items such as Windows Update leftovers, select Clean up system files, choose the drive again and approve the administrator prompt. The list then reloads with more entries.
- Select OK, then Delete Files to confirm.
Warning: the same cautions apply here. Leave Downloads unselected if it appears, and don’t select Previous Windows installation(s) unless you’re sure you won’t need to roll back.
4. Empty your Temp folder with %temp%
Each user account has its own Temp folder, and apps you run write their temporary files there. %temp% is a shortcut (an environment variable) that points to it, so you don’t need to find the folder yourself. This manual method isn’t in the Microsoft pages cited below; it relies on standard File Explorer behavior.
- Close the apps you have open, so fewer files are locked.
- Press Windows key + R to open Run, type
%temp%and press Enter. File Explorer opens the Temp folder, which is normallyC:\Users\YourName\AppData\Local\Temp(with your own user folder name). - Press Ctrl + A to select everything in the folder, then press Delete.
- If Windows says a file or folder is open in another program, select Do this for all current items (if shown) and then Skip. Those files are still in use and can stay.
- Empty the Recycle Bin if you want the space back right away. Microsoft’s Free up drive space in Windows page reminds you to empty it to remove deleted files completely and free up space.
AppData is a hidden folder, so you won’t see it if you browse to it by hand unless hidden items are shown. The %temp% shortcut gets around that, but if you want to look around the folder yourself, see how to show hidden files in Windows 11.
Delete only the contents of the Temp folder, not the Temp folder itself. Apps expect it to be there.
5. Clear the Windows Temp folder (admin)
Windows also has a system-wide Temp folder at C:\Windows\Temp, used by Windows services and installers rather than by your own apps. Clearing it is optional; methods 1 and 3 can include system temporary files anyway. Like method 4, this isn’t covered in the cited Microsoft pages, so go carefully.
- Sign in with an administrator account. Changing files in the Windows folder needs admin rights.
- Press Windows key + R, type
C:\Windows\Tempand press Enter. - If Windows says you don’t currently have permission to access the folder, select Continue to grant access with your admin rights.
- Select the files and folders inside, press Delete, and choose Skip for anything that’s in use.
If the Continue button doesn’t work or you’re refused access on a standard account, the folder permission guide explains what’s going on. Don’t take ownership of system folders just to clear temporary files; skipping them is the safer choice.
What not to delete
Temporary files are low risk, but the tools above sit next to things that aren’t. Keep these out of a temp-files cleanup:
- Your Downloads folder and the Recycle Bin, unless you’ve checked them. They show up beside temporary files in Settings and Disk Cleanup, but they hold your files.
- Previous Windows Installation(s) if you might need to go back to the earlier version of Windows.
- The Temp folders themselves. Empty them; don’t delete or rename them.
- Anything outside the Temp folders, such as other AppData subfolders, Prefetch or WinSxS. These aren’t temporary files, and removing them by hand can break apps or Windows features.
- Files an installer is still using. If you’re in the middle of installing an app or an update, finish it and restart before you clean up.
If temporary files won’t delete
These are starting points, not a full diagnosis.
| What you see | Possible cause | What to try |
|---|---|---|
| File in use or open in another program | An app or Windows still has it open | Choose Skip, or restart and try again before opening apps |
| You need permission to perform this action | No admin rights for a system folder | Use an admin account, or skip that file |
| Temporary files come back | Apps create new ones as they run | Turn on Storage Sense (method 2) |
| Low Disk Space warning after cleanup | Microsoft Store .appx files filling the Temp folder | Run the Windows Store Apps troubleshooter and wsreset.exe, then restart |
The last row comes from Microsoft’s Free up drive space in Windows page, which also suggests running the Windows Update troubleshooter for that error. If temporary files weren’t the problem and the drive is still full, the full disk space guide lists what else you can remove.
Related guides
- How to free up disk space in Windows 11
- How to delete Windows.old in Windows 11 and 10
- How to show hidden files and folders in Windows 11
- You don’t currently have permission to access this folder: how to fix it
- The Recycle Bin is corrupted: how to fix it on Windows 11
Leave a Reply