# Storage Sense and Disk Cleanup: what is safe to delete

> Which cleanup targets are free space and which ones cost you something, how to run WinSxS cleanup, and what actually fills a modern drive.

**Tested on**

- Build: 26300.9457 / 26100.33650
- Edition: Pro (26H2) / Server
- Architecture: x64
- Evidence: E1
- Verified: 2026-10-29

## The short answer

Three different cleanup mechanisms, three different risk levels:

| Tool | Frees | Risk |
|---|---|---|
| **Storage Sense** | temp files, recycle bin, old Downloads | low, runs automatically |
| **Disk Cleanup (`cleanmgr`)** | Windows Update leftovers, old installs, thumbnails | low, but some items are one-way |
| **WinSxS cleanup (`/StartComponentCleanup`)** | superseded component versions | medium — no rollback after |

The biggest wins are usually **not** in these tools: it is the 40GB of games, the 20GB of OneDrive cache, or the hibernation file.

## Start with the honest picture

```powershell
Get-Volume | Select-Object DriveLetter,FileSystemLabel,@{n='SizeGB';e={[math]::Round($_.Size/1GB,1)}},@{n='FreeGB';e={[math]::Round($_.SizeRemaining/1GB,1)}}
Get-ChildItem $env:USERPROFILE -Directory -Force -ErrorAction SilentlyContinue |
  ForEach-Object {
    $s = (Get-ChildItem $_.FullName -Recurse -Force -File -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum
    [pscustomobject]@{ Folder = $_.Name; GB = [math]::Round($s/1GB,2) }
  } | Sort-Object GB -Descending | Select-Object -First 10
```

This finds the real consumer before you start deleting system files.

## What each item actually is

| Item | Safe? | Note |
|---|---|---|
| Temporary files | yes | apps recreate them |
| Recycle bin | yes | it is a bin |
| Downloads | **check first** | Storage Sense can delete them automatically |
| Thumbnails | yes | regenerated on demand |
| Delivery Optimisation files | yes | update cache |
| Windows Update cleanup | yes | removes old update packages |
| Previous Windows installation | **one-way** | no rollback after |
| WinSxS superseded components | **one-way** | see below |
| Hibernation file | configurable | disables hibernation/fast startup |
| Page file | **no** | managed by the system |

## WinSxS: the folder people fear

`C:\Windows\WinSxS` is not a backup copy of Windows; it is the component store. It contains **hard links** to files that are in use, so its reported size is far larger than the space it really occupies.

Clean it with the supported command:

```powershell
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
```

- `AnalyzeComponentStore` tells you whether cleanup is worthwhile.
- `/ResetBase` removes the ability to **uninstall installed updates**. Do not use it on a machine where you may need to roll back a bad patch.

> **Caution: Do not delete WinSxS by hand**
>
> Taking ownership and deleting files there breaks servicing and future updates. There is no supported way back except a repair install.

## Disk Cleanup (`cleanmgr`) without the guesswork

Storage Sense is the automatic path. `cleanmgr` is the manual one, and it has two profiles that people mix up:

| Mode | Launches | Shows |
|---|---|---|
| `cleanmgr` | the standard profile | user-level temp files only |
| **Clean up system files** | the elevated profile | Update leftovers, old installs, WinSxS |

That second pass is the one with real reclaim, and the one that can cost you a rollback. Run it deliberately:

```powershell
cleanmgr /lowdisk        # pre-selects the biggest safe items
cleanmgr /sageset:11     # pick items once, stored under this number
cleanmgr /sagerun:11     # run those picks unattended later
```

`/sageset` writes its selection to the registry, so `/sagerun` can be scheduled. Two items deserve a decision rather than a default:

- **"Previous Windows installation(s)"** — deleting `Windows.old` ends the 10-day window to go back to the old build. The system removes it automatically after that window; deleting early only saves time, not much space you will miss.
- **"Delivery Optimisation Files"** — the local update cache. Safe, but it re-downloads on the next update.

> **Caution: cleanmgr cannot clean what it cannot see**
>
> The standard profile runs as you. Files owned by SYSTEM in `C:\Windows\Temp` or a service profile are invisible to it — those need the **Clean up system files** pass, or a manual look. If space does not move after a clean run, the consumer is probably not in the list at all: check the folder-size query above.

## Hibernation and fast startup

`hiberfil.sys` is usually 40–100% of RAM. Removing it also removes **Fast Startup** and hibernate:

```powershell
powercfg /hibernate off   # deletes hiberfil.sys, disables fast startup + hibernate
powercfg /hibernate on    # back on
```

If the machine is a desktop that never hibernates and has a small SSD, turning it off is a legitimate 8–32GB. On a laptop, think about it — see [sleep, hibernate and Fast Startup](https://windows.homes/en/windows/perf/sleep-hibernate-faststartup/).

## Automate the low-risk part

**Settings → System → Storage → Storage Sense**: enable it, set Downloads cleanup to "never" if you use that folder, and let it run weekly.

## Related

- [OneDrive Files On-Demand](https://windows.homes/en/windows/files/onedrive-files-on-demand/)
- [File Explorer in Windows 11](https://windows.homes/en/windows/files/explorer/)
- [Sleep, hibernate and Fast Startup](https://windows.homes/en/windows/perf/sleep-hibernate-faststartup/)

## Lab boundary

E1. The cleanup commands are Microsoft-documented; no cleanup was run on the lab VMs for this page, so no freed-space figures are claimed.

## Sources

- [Microsoft Learn — Clean up the WinSxS folder](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/clean-up-the-winsxs-folder)
- [Microsoft Learn — Windows Setup command-line options](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options)
- [Microsoft Learn — Powercfg command-line options](https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/powercfg-command-line-options)

---

Source: https://windows.homes/en/windows/files/storage-sense/
