# Can you delete WinSxS, Windows.old and SoftwareDistribution?

URL: https://www.kemptdesk.com/guides/windows-winsxs-windows-old-softwaredistribution
Platform: PC
Applies to: Windows 10 and Windows 11 (checked against version 26H2)
Reviewed: 2026-11-23
Publisher: KemptDesk (https://www.kemptdesk.com), a disk clean-up app for Mac and PC

Never delete `C:\Windows\WinSxS` by hand: it is the Windows component store, and Microsoft warns that removing files from it can stop Windows from booting or updating. Shrink it with `Dism.exe /online /Cleanup-Image /StartComponentCleanup`. Windows.old and `SoftwareDistribution\Download` are safe to remove with Settings or Disk Cleanup once you no longer need to roll back.

These folders are part of [what to delete when the C drive is full](https://www.kemptdesk.com/guides/c-drive-full). Each one has a supported way to make it smaller. For Temp and app caches, see [which AppData and Temp files are safe to delete](https://www.kemptdesk.com/guides/windows-appdata-temp).

## Where it is

All of them are on the Windows drive, C: on most PCs. `%SystemRoot%` is the Windows folder, usually `C:\Windows`.

- `C:\Windows\WinSxS`: the component store.
- `C:\Windows.old`: your previous Windows version, after an upgrade.
- `C:\$Windows.~BT`: upgrade files that Windows also needs to go back.
- `C:\Windows\SoftwareDistribution\Download`: files that Windows Update downloaded.
- Delivery Optimization files: update files that Windows keeps to share with other PCs. Disk Cleanup lists them as **Delivery Optimization Files**.

## Which parts are safe to delete

| Path | What it is | Safe to delete | What happens if you delete it | How to clean it |
| --- | --- | --- | --- | --- |
| `C:\Windows\WinSxS` | Component store: the parts Windows uses to update, repair and turn features on or off | No | Windows may not boot, and updates can fail | `Dism.exe /online /Cleanup-Image /StartComponentCleanup`, or Disk Cleanup's update clean-up item |
| `C:\Windows.old` | Your previous Windows version after an upgrade | Careful | You can no longer go back to the previous version | Settings > System > Storage > Cleanup recommendations > Previous Windows installation(s) |
| `C:\$Windows.~BT` | Upgrade files used to go back | Careful | Go back stops working | Leave it while you may go back; later run `cleanmgr /autoclean` |
| `C:\Windows\SoftwareDistribution\Download` | Update files that Windows Update downloaded | Yes | Windows Update downloads the files again if it needs them | Disk Cleanup's update clean-up item, or the steps below |
| `C:\Windows\SoftwareDistribution\DataStore` | The Windows Update database | No | Windows Update must rebuild it; Microsoft renames it only as a repair step | Do not clean it |
| Delivery Optimization Files | Update files kept to share with other PCs | Yes | Nothing you need; Windows clears this cache by itself | Disk Cleanup > Delivery Optimization Files |

## Why WinSxS looks so large

The component store holds the components that make up Windows, so Windows can roll back changes or repair damaged files. Some system files exist only there.

Most files in WinSxS also appear in other Windows folders, but there is usually only one copy on disk. The other entries are hard links, second names for the same data. File Explorer adds up every name, so it counts shared files more than once and shows WinSxS larger than it is.

To see the real size, open Command Prompt as administrator and run:

```cmd
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
```

DISM shows these lines, among others:

- **Windows Explorer Reported Size of Component Store**: the size File Explorer shows.
- **Shared with Windows**: files that Windows also uses from other folders. They are not extra space.
- **Backups and Disabled Features** and **Cache and Temporary Data**: the real overhead. Add these two to know what cleanup can work on.
- **Component Store Cleanup Recommended**: Yes or No.

In Microsoft's own example, File Explorer reports 4.98 GB, but the overhead is only about 507 MB. The rest is shared with Windows and cannot be freed.

## How to shrink WinSxS safely

Windows already cleans the component store on a schedule, but keeps old versions for a while in case you need to roll back. Use the steps below when DISM recommends cleanup or the drive is full.

### Option 1: Disk Cleanup

1. In the search box on the taskbar, type **Disk Cleanup**, then select it.
2. Select drive **C:** and select **OK**.
3. On the **Disk Cleanup** tab, select the item that cleans up old Windows updates. Microsoft says this option helps reduce the size of the component store.
4. Select **OK**, then **Delete Files**.

### Option 2: Run the scheduled cleanup now

The StartComponentCleanup task waits at least 30 days after an update before it removes the old versions. When you start it by hand, it stops after 1 hour and may not finish. In an elevated Command Prompt, run:

```cmd
schtasks.exe /Run /TN "\Microsoft\Windows\Servicing\StartComponentCleanup"
```

### Option 3: DISM

This command removes old versions of updated components at once, with no 30-day wait and no 1-hour limit. Run it in an elevated Command Prompt:

```cmd
Dism.exe /online /Cleanup-Image /StartComponentCleanup
```

The next command deletes every superseded version of every component. After it runs, you cannot uninstall the updates that are already installed; future updates can still be uninstalled.

```cmd
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
```

> **Careful:** Use `/ResetBase` only when Windows has run well since the last update. If a recent update causes problems later, you will not be able to remove it.

## Windows.old: what it is and when to remove it

After a feature upgrade, Windows keeps the previous version in `C:\Windows.old` so you can go back. Microsoft says that in most cases you have 10 days, and that Windows deletes the previous version by itself after those 10 days.

To go back, select Settings > System > Recovery > **Go back**. This keeps your personal files but removes apps and drivers you installed after the upgrade. It works only if `windows.old` and `$windows.~bt` are intact and you removed user accounts added after the upgrade.

Decide like this:

- **Delete it** if Windows and your apps work well and you will not go back.
- **Keep it** if you upgraded in the last few days and something still fails.

### Remove Windows.old on Windows 11

1. Select Start > Settings > System > Storage.
2. Select **Cleanup recommendations**.
3. Select **Previous Windows installation(s)**.
4. Select the **Clean up** button that shows the size.

Microsoft gives these steps in KB5012334. The item only appears while the previous version is still on the PC.

### Remove Windows.old on Windows 10

1. Open Settings, then select System > Storage.
2. In the Storage sense section, select **Change how we free up space automatically**.
3. Under **Free up space now**, select **Delete previous version of Windows**.
4. Select **Clean now**.

### Change the rollback window

Administrators can check or change how many days a PC can go back, in an elevated Command Prompt. A value below 2 or above 60 makes Windows use the default of 10.

```cmd
DISM /Online /Get-OSUninstallWindow
DISM /Online /Set-OSUninstallWindow /Value:30
```

## SoftwareDistribution\Download: clean it the safe way

`C:\Windows\SoftwareDistribution\Download` holds update files that Windows Update downloaded. Use Disk Cleanup first: select the item that cleans up old Windows updates and **Delivery Optimization Files**. You can also use Settings > System > Storage > Cleanup recommendations > Temporary files.

If the folder stays large, empty it by hand. Stop the update services first, because Windows Update may be using the files. These steps come from Microsoft's Windows Update reset procedure:

1. Select Start, type **cmd**, right-click **Command Prompt** and select **Run as administrator**.
2. Stop the services, rename the download folder, and start the services again:

```cmd
net stop bits
net stop wuauserv
Ren %Systemroot%\SoftwareDistribution\Download Download.bak
net start bits
net start wuauserv
```

3. Run Windows Update once. When it works, delete the `Download.bak` folder in File Explorer to free the space.

> **Tip:** Do not delete the whole `SoftwareDistribution` or `DataStore` folder to save space. Microsoft uses those steps only to repair Windows Update.

## How KemptDesk handles this

KemptDesk treats everything under `C:\Windows`, plus `C:\Windows.old` and `C:\$Windows.~BT`, as Protected. Space Lens shows their size, names the Windows tool for WinSxS and Windows.old, and never selects them. KemptDesk does not run DISM and does not remove Windows.old.

In System Junk, the Windows Update downloads category covers `SoftwareDistribution\Download` and the Delivery Optimization cache. It takes only files older than 10 days, needs administrator, and is not ticked for you. KemptDesk deletes these files directly, because Windows downloads them again. It checks each file again before removal, skips files that changed or are in use, and writes every removal to a log.

## Questions

### Can I delete the WinSxS folder to free up space?

No. Microsoft warns that deleting the folder, or files in it, can damage Windows so that it does not boot and cannot be updated. Use Disk Cleanup's update clean-up item or `Dism.exe /online /Cleanup-Image /StartComponentCleanup` instead.

### Why is WinSxS so big in File Explorer?

Most of its files are hard links to files that Windows uses in other folders, and File Explorer counts them twice. Run `Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore` to see the real size and how much cleanup can free.

### Is it safe to delete the SoftwareDistribution Download folder?

Yes, the update files in it can be removed. Use Disk Cleanup's update clean-up item, or stop the `wuauserv` and `bits` services before you empty the folder by hand.

### How long can I keep Windows.old before Windows deletes it?

By default, 10 days after the upgrade. An administrator can set the window from 2 to 60 days with `DISM /Online /Set-OSUninstallWindow /Value:<days>`.

## Sources

- [Clean up the WinSxS folder (Microsoft Learn)](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/clean-up-the-winsxs-folder)
- [Determine the actual size of the WinSxS folder (Microsoft Learn)](https://learn.microsoft.com/pl-pl/windows-hardware/manufacture/desktop/determine-the-actual-size-of-the-winsxs-folder?view=windows-10)
- [Manage the component store (Microsoft Learn, archived)](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-8.1-and-8/dn251569(v=win.10))
- [Go back to the previous version of Windows (Microsoft Support)](https://support.microsoft.com/windows/deployment/install-upgrade/go-back-to-the-previous-version-of-windows)
- [Delete your previous version of Windows (Microsoft Support)](https://support.microsoft.com/en-us/windows/delete-your-previous-version-of-windows-f8b26680-e083-c710-b757-7567d69dbb74)
- [KB5012334: Delete the Windows.old folder using Storage sense in the Settings app (Microsoft Support)](https://support.microsoft.com/en-us/kb/5012334)
- [DISM operating system uninstall command-line options (Microsoft Learn)](https://learn.microsoft.com/en-au/windows-hardware/manufacture/desktop/dism-uninstallos-command-line-options?view=windows-11)
- [Windows Update: additional resources, reset Windows Update components (Microsoft Learn)](https://learn.microsoft.com/en-us/windows/deployment/update/windows-update-resources)
- [Delivery Optimization frequently asked questions (Microsoft Learn)](https://learn.microsoft.com/en-us/windows/deployment/do/waas-delivery-optimization-faq)
- [cleanmgr command (Microsoft Learn)](https://learn.microsoft.com/windows-server/administration/windows-commands/cleanmgr)
- [Windows 11 release information (Microsoft Learn)](https://learn.microsoft.com/en-us/windows/release-health/windows11-release-information)
- [How to delete Windows Update cache (Microsoft Q&A, question wording)](https://learn.microsoft.com/en-us/answers/questions/3891166/how-to-delete-windows-update-cache)
