TechBuzzPro

How to Delete Windows.old When Disk Cleanup Fails

· 6 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

If Disk Cleanup fails to remove the Windows.old folder, the most reliable fix is to take ownership of the folder and delete it manually, or to use the built-in Storage settings to remove previous Windows installations. The Windows.old folder holds your previous Windows installation after an upgrade or feature update, and it can be several gigabytes. Disk Cleanup normally removes it, but it sometimes fails because of permission errors, locked files, or a corrupted cleanup component. The steps below walk you through the safe manual method and the official alternatives. Before you start, make sure you have backed up any personal files you still need from the old installation, because once the folder is gone, it cannot be recovered.

What You'll Need

  • Administrator rights on the PC.
  • Enough free disk space to work with (the folder is usually 10–20 GB, but can be larger).
  • A backup of any files from the previous Windows installation that you want to keep.
  • Windows Explorer (File Explorer) and, if needed, Command Prompt running as administrator.

Step-by-Step

  1. Try the official Storage settings first. Open Settings > System > Storage. Under the list of drives, click the drive where Windows is installed (usually C:). Click Temporary files. Check the box for Previous Windows installation(s) and any other categories you want to clear, then click Remove files. This is the modern equivalent of Disk Cleanup and often succeeds where Disk Cleanup fails. If it works, you are done. If it does not, continue.
  2. Run Disk Cleanup as administrator. Sometimes Disk Cleanup fails because it was not run with elevated rights. Press the Windows key, type Disk Cleanup, right-click the result and choose Run as administrator. Select the C: drive, click OK, then click Clean up system files. Wait for the scan, check Previous Windows installation(s), and click OK. If it still fails, move on.
  3. Take ownership of the Windows.old folder. Open File Explorer and navigate to C:\ (or the root of your system drive). If you do not see Windows.old, go to View > Show > Hidden items (in Windows 11, View > Show > Hidden items). Right-click the Windows.old folder, choose Properties, go to the Security tab, and click Advanced. At the top, next to Owner, click Change. Type your username (or Administrators) in the box, click Check Names, then OK. Check the box Replace owner on subcontainers and objects, then click OK. This gives you permission to delete the folder. Note that menu labels can differ slightly between Windows versions.
  4. Grant full control to your account. Still in the Advanced Security Settings window, click Add, then Select a principal. Type your username, click Check Names, then OK. In the Basic permissions list, check Full control, then OK. On the main Advanced Security Settings window, check Replace all child object permission entries with inheritable permission entries from this object, then click Apply and Yes when prompted. This step can take a few minutes on a large folder.
  5. Delete the folder. Close any open windows or programs that might be using files in Windows.old. In File Explorer, right-click Windows.old and choose Delete. If you get an error that a file is in use, restart the PC and try again. If it still will not delete, open Command Prompt as administrator (search for cmd, right-click, Run as administrator) and run: rmdir /s /q C:\Windows.old. This command forcibly removes the folder and its contents. Be careful to type the path exactly; this command permanently deletes data.
  6. Use the built-in cleanup tool as a last resort. If manual deletion still fails, open Command Prompt as administrator and run: cleanmgr /sageset:1. This opens a settings window where you can check Previous Windows installation(s). Click OK. Then run cleanmgr /sagerun:1 to execute the cleanup with those settings. This is the same engine as Disk Cleanup but can behave differently when run this way.
  7. Restart and verify. After deletion, restart your PC. Check that C:\Windows.old is gone. If it reappears, a pending update or rollback task may be recreating it; see Troubleshooting.

Common Mistakes

  • Deleting Windows.old before you are sure you do not need to roll back. Once deleted, you cannot use the “Go back to previous version” option in Settings > System > Recovery. If the new Windows build is causing problems, you lose that easy rollback.
  • Not taking ownership correctly. Many people change the owner but forget to check “Replace owner on subcontainers and objects” or “Replace all child object permission entries”. Without those, deletion fails partway through.
  • Using third-party “cleaner” tools. Some tools claim to remove Windows.old but can leave the system in an inconsistent state. Stick to built-in Windows tools.
  • Typing the wrong path in Command Prompt. A typo like rmdir /s /q C:\Windows would damage your current installation. Double-check the path before pressing Enter.
  • Ignoring disk space. If the drive is nearly full, the deletion process may fail. Free up some space first.

Tips

  • Windows automatically deletes Windows.old after 10 days (or 30 days in some versions) if you do not remove it manually. You can adjust this in Settings > System > Storage > Storage Sense, but the default is usually fine.
  • If you plan to keep the old installation for a while, move it to an external drive instead of deleting it. You can copy the folder, but it will not be bootable without extra work.
  • Use the Disk Cleanup “Clean up system files” button even if the regular cleanup fails; it often has more options.
  • Before deleting, check the size of Windows.old by right-clicking it and choosing Properties. This helps you confirm you are removing the right folder.
  • If you use a third-party antivirus, temporarily disable it during deletion; some scanners lock files in Windows.old.

Troubleshooting

If the folder still will not delete, work through these checks in order:

  • “Access is denied” or “You need permission” errors: Repeat the ownership steps, making sure you are logged in as an administrator and that you checked the replace options. Then try deleting again.
  • “The file is in use” errors: Restart the PC and try immediately. If that fails, boot into Safe Mode (Settings > System > Recovery > Advanced startup > Restart now > Troubleshoot > Advanced options > Startup Settings > Restart > press 4 or F4). In Safe Mode, fewer files are locked, so deletion often works.
  • Disk Cleanup or Storage settings hang or crash: Run the System File Checker. Open Command Prompt as administrator and run sfc /scannow. Then run DISM /Online /Cleanup-Image /RestoreHealth. Restart and try again.
  • Windows.old reappears after deletion: A pending update or a scheduled task may be recreating it. Check Windows Update and install any pending updates, then restart. If it still reappears, run the Disk Cleanup sageset method again.
  • You cannot find Windows.old: It may already be deleted, or it may be hidden. Enable hidden items in File Explorer. Also check that you are looking at the root of the system drive, not a user folder.

Frequently Asked Questions

Is it safe to delete Windows.old?

Yes, once you are confident you will not need to roll back to the previous Windows version. It contains only the old system files and does not affect your current installation.

How long does Windows keep Windows.old?

Windows typically removes it automatically after 10 days, but this can vary by version. You can delete it sooner using the methods above.

Can I move Windows.old to another drive instead of deleting it?

You can copy it, but it will not function as a bootable backup without additional steps. For most people, deleting it is the practical choice.

Why does Disk Cleanup fail to remove Windows.old?

Common causes are permission issues, files locked by another process, or a corrupted cleanup component. Taking ownership and deleting manually usually resolves it.

Will deleting Windows.old free up space immediately?

Yes, the space is reclaimed as soon as the folder is removed. The exact amount depends on the size of the old installation.

What if I need to go back to the previous version after deleting Windows.old?

You cannot use the built-in rollback option. You would need to reinstall the older version manually, which requires installation media and a backup of your data.