Delete the Windows.old folder from a server

When performing an in place upgrade of your server, you are left with a folder called windows.old which you are unable to delete, even if you take ownership of it.

Whereas in a client version of windows, you can remove this using the disk cleanup tool, this is not possible on Windows Server.

For this you will need to follow the below procedure.

From the start menu, type CMD into the search facility or run box, and then right click on it and “run as administrator”.

Type the following at the command prompt, type the following and run then in sequence:

takeown /F <DriveLetter>:\<FolderName>\* /R /A

cacls <DriveLetter>:\<FolderName>\*.* /T /grant administrators:F

rmdir /S /Q  <DriveLetter>:\<FolderName>\


  1. It work pretty good but i tried another thing.
    1º open a cmd elevated
    2º run psexec -i -s %comspec% > it will open a cmd with user system (Pstools is needed to do that)
    3º create a empty folder “New folder” > “C:\new folder”
    4º robocopy “c:\new folder” c:\windows.old /purge
    5º be happy

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.