# How to Delete Temp Files and Windows.old Safely

> Free space in Windows with Disk Cleanup, Storage Sense and the %temp% folder, which files are safe to delete, and the real deadline on removing Windows.old.

- Source: https://zepe.online/guides/delete-temp-files-windows
- Author: Robert Moca (https://zepe.online/author/robert-moca)
- Topic: Performance and storage
- Published: 2026-07-27T09:00:00+00:00
- Updated: 2026-08-15T09:00:00+00:00
- Author: Zepe editorial team (https://zepe.online/editorial-standards)
- Image: https://zepe.online/img/delete-temp-files-windows-featured-ece840ca8b.webp

## The short answer

Press **Win + R**, type `%temp%`, select everything and delete — files in use are skipped, which is fine. For the real space, run **Disk Cleanup → Clean up system files** and tick *Previous Windows installation(s)*, often 20 GB.

## Key takeaways

- Windows deletes Windows.old automatically after 10 days; removing it early only forfeits the ability to roll back an upgrade.
- Disk Cleanup's ordinary mode misses the largest items — you must click **Clean up system files** to see them.
- Deleting the Windows.old folder by dragging it to the Recycle Bin does not work; permissions block it.
- Registry cleaners and aggressive service disabling do not free meaningful space and occasionally cause harm.

Windows quietly builds up a lot of files it no longer needs, and the biggest of them are invisible to the tool everyone reaches for. Run Disk Cleanup normally and it offers you a few hundred megabytes. Click one extra button, which is the whole trick, and the very same tool offers to give back twenty or thirty gigabytes. That button is the reason this page exists.

**Figure: Typical space recovered, by category**

Figures from a machine a few weeks after a feature update. Windows.old dominates, and it is the one the default Disk Cleanup view does not show you.

- Previous Windows installation: 20 GB (Windows.old — needs 'Clean up system files')
- Windows Update cleanup: 5 GB (Superseded update components)
- Temporary files: 2 GB (%temp% and the system temp folder)
- Delivery Optimisation files: 1 GB (Update data cached for other PCs)
- Thumbnail cache: 1 GB (Rebuilds itself as you browse folders)

## The %temp% folder

### Clear your user temporary files

1. Press **Win + R**, type `%temp%` and press Enter.
   This opens `C:\Users\you\AppData\Local\Temp`. The percent signs matter — they expand the environment variable.
2. Press **Ctrl + A**, then **Delete**.
   Selection shortcuts are covered in the guide on [selecting multiple files](https://zepe.online/guides/select-multiple-files-windows).
3. When Windows says a file is in use, tick **Do this for all current items** and click **Skip**.
   Files held by running programs cannot be deleted and should not be. Skipping them is correct, not a failure.
4. Optionally repeat for the system temp folder: **Win + R**, `C:\Windows\Temp`, Enter.
   This one needs administrator confirmation.

> **Key point — It is safe, and it is also not where the space is**
>
> Everything in %temp% is by definition disposable — that is what the folder is for. But it rarely holds more than a couple of gigabytes. If you are trying to rescue a full drive, go straight to Disk Cleanup's system files mode.

## Disk Cleanup, including the part people miss

### Run Disk Cleanup properly

1. Press **Win + R**, type `cleanmgr` and press Enter. Choose your C: drive.
   It takes a moment to calculate. On a large drive this can be a minute or two.
2. Click **Clean up system files**.
   This is the important step. The dialog reopens with administrator rights and a much longer list including the multi-gigabyte items.
3. Tick **Previous Windows installation(s)**, **Windows Update Cleanup**, **Delivery Optimization Files** and **Temporary files**.
   Leave **Downloads** unticked. It deletes your actual Downloads folder, and it is included in the list in a way that has caught a lot of people out.
4. Click **OK**, then **Delete Files**, and leave it alone.
   Windows Update Cleanup in particular can take twenty minutes or more, and it may continue in the background after the window closes.

**What each Disk Cleanup category actually removes**

| Category | Safe to delete? | What you lose |
| --- | --- | --- |
| Previous Windows installation(s) | Yes | The ability to roll back the upgrade |
| Windows Update Cleanup | Yes | Ability to uninstall older updates |
| Temporary files | Yes | Nothing |
| Delivery Optimization Files | Yes | Cached update data, re-downloaded if needed |
| Thumbnails | Yes | Previews regenerate as you browse |
| Recycle Bin | Careful | Everything you deleted and had not confirmed |
| **Downloads** | **No** | **Your entire Downloads folder** |
| Windows ESD installation files | Careful | The local Reset this PC image |

> **Careful — Two entries to leave alone**
>
> **Downloads** is your real Downloads folder, not a cache — untick it. **Windows ESD installation files** holds the local recovery image used by Reset this PC; delete it and a future reset will need to download several gigabytes, or may not be possible offline at all.

## Windows.old and the 10-day deadline

After a feature update, Windows keeps your entire previous installation in `C:\Windows.old`. It is there for exactly one reason: so you can go back if the new version turns out to be a problem. Everything needed for that rollback is in the folder, which is precisely why it is enormous.

Windows deletes it automatically ten days after the upgrade. During those ten days, **Settings → Update & Security → Recovery → Go back to the previous version** is available. After the folder goes, so does that option.

- **Deleting it early is safe**, provided you are confident you will not want to roll back. Nothing else depends on it.
- **You cannot delete it in File Explorer.** Permissions block it, and dragging it to the Recycle Bin fails with an access error. Use Disk Cleanup's *Previous Windows installation(s)* entry.
- **Your personal files are not in it** in any form you need. They were migrated to the new installation during the upgrade. Windows.old holds the old copies.
- **If you plan to roll back, do not delete it**, and do it within the ten days.

## Storage Sense, to stop doing this manually

Windows 10 and 11 both include Storage Sense, which does most of the above automatically on a schedule. It is off by default, which is a genuine shame, because it is the one part of this guide you only ever have to set up once.

### Set up Storage Sense

1. Open **Settings → System → Storage**.
2. Turn **Storage Sense** on, then click through to its settings.
3. Set it to run **During low free disk space**, or weekly if you would rather it stayed ahead.
   Low free disk space is the sensible default — it does nothing until the space is actually needed.
4. Set **Delete files in my Recycle Bin if they have been there for over** to 30 days.
   Leave the Downloads folder option set to Never unless you are certain. It deletes files you may still want.

## Other places space hides

1. **Hibernation file.** `C:\hiberfil.sys` is sized in proportion to your RAM, often 8 to 16 GB. If you never hibernate, `powercfg /hibernate off` from an elevated prompt removes it. This also disables Fast Startup, which is arguably a benefit for troubleshooting.
2. **System Restore allocation.** System Properties → System Protection → Configure. Restore points can occupy several percent of the drive. Reducing the maximum rather than turning protection off keeps a safety net.
3. **The WinSxS component store.** Do not delete anything here by hand. Run `dism /Online /Cleanup-Image /StartComponentCleanup` from an elevated prompt instead, which removes superseded components safely.
4. **Old user profiles.** A deleted account can leave its profile folder behind in `C:\Users`. The guide on [deleting a user account](https://zepe.online/guides/delete-user-account-windows-10) covers removing these properly.
5. **Developer tool caches.** `node_modules` directories, npm and pip caches, and Docker images routinely run to tens of gigabytes; see [uninstalling developer tools cleanly](https://zepe.online/guides/uninstall-dev-tools-windows).

> **Editor's note — On things not to bother with**
>
> Two things that come up constantly and are worth dismissing properly. Registry cleaners free no meaningful space, because the whole registry is measured in tens of megabytes, and they carry a real risk of removing something that mattered. Disabling services to save disk space does nothing at all, because services take up memory, not storage. Neither belongs anywhere near a disk-space routine.

If the drive is still full after all this, the problem may not be files at all: a C: partition that is simply too small can sometimes be enlarged instead, which the guide on [extending the C drive](https://zepe.online/guides/extend-c-drive-windows-10) covers along with the specific reason Extend Volume is usually greyed out.

## Common questions

### Is it safe to delete the Windows.old folder?

Yes, as long as you do not want to roll back to your previous Windows version. It contains your old installation and exists only to make that rollback possible. Windows deletes it automatically after ten days, and removing it early through Disk Cleanup simply brings that forward. Your personal files are in the current installation, not in Windows.old.

### Why can't I delete Windows.old in File Explorer?

Its permissions are set so that even an administrator cannot delete it directly, which prevents accidental removal during the rollback window. Use Disk Cleanup, click **Clean up system files**, and tick **Previous Windows installation(s)**: that is the supported route and it works.

### Is it safe to delete everything in the temp folder?

Yes. Everything there is disposable by design. Files currently in use by a running program cannot be deleted and Windows will offer to skip them — accept that, it is the correct outcome rather than an error. Closing your applications first lets a few more go.

### How much space can Disk Cleanup actually free?

In its default mode, usually a few hundred megabytes. After clicking **Clean up system files**, commonly 20 to 30 GB on a machine that has taken a feature update recently, because Windows.old and superseded update components then become visible. That one button is the difference between a trivial cleanup and a useful one.

## Sources

- [Disk Cleanup in Windows](https://support.microsoft.com/en-us/windows/disk-cleanup-in-windows-8a96ff42-5751-39ad-23d6-434b4d5b9a68) — Microsoft Support. Supports: The Disk Cleanup categories, the Clean up system files button, and that it can remove previous Windows installations.
- [Windows upgrade and migration considerations](https://learn.microsoft.com/en-us/windows/deployment/upgrade/windows-upgrade-and-migration-considerations) — Microsoft Learn. Supports: That the previous installation is retained after an upgrade to permit rollback, which is what Windows.old holds.
- [Deployment troubleshooting and log files](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/deployment-troubleshooting-and-log-files) — Microsoft Learn. Supports: The role of the Windows.old directory in upgrade rollback and where upgrade artefacts are stored.

## Related guides

- https://zepe.online/guides/extend-c-drive-windows-10
- https://zepe.online/guides/uninstall-dev-tools-windows
- https://zepe.online/guides/stop-automatic-updates-windows-10

---

© 2026 Zepe. Windows is a trademark of Microsoft Corporation; this site is not affiliated with Microsoft.
