Delete WINDOWS.OLD on Windows Server

Posted: October 5, 2014 in Information, Server 2012, Windows General
Tags: , , ,

After performing an in-place upgrade on a Windows machine, you will find a WINDOWS.OLD folder in the root of C:. This folder will have a backup of your old program files, appdata and Windows folder… just in case you need to revert back or recover something that might have been lost during the upgrade. When you try to delete it though you are told you don’t have permissions. Just a small point here, it is generally not recommended to do in-place upgrades on servers. In fact there are some products (e.g. Exchange, ConfigMgr) that explicitly state they do not support upgrading the Operating System. There is of course a difference between “what works” and “what is supported”, but I do suggest where possible you do a clean Server install and migrate your application to the new server. Anyway, let’s assume you’ve understand all the risks and have done a successful in-place upgrade, you now find the old WINDOWS.OLD folder of several GB in size sitting there. If all is well, then you might as well just delete it.


On Desktop OS version, you can just use the disk cleanup tool to remove it, but that is not available (by default) on Servers, so there are a couple of approaches.

1. Command line tools to take ownership and delete the folder (as per: Make sure to “run as administrator”

takeown /F c:\Windows.old\* /R /A /D Y 
cacls c:\Windows.old\*.* /T /grant administrators:F
rmdir /S /Q c:\Windows.old

2. Or you can add the “Desktop” features to provide the Disk Cleanup tool:

Personally, the command line option is less messy and saves having to add features to your server that don’t really need to be there.

  1. Ron Bramblett says:

    If you run this command the default user looses permission on these servers.

    • Scott says:

      What do you mean by the “default user”? Are you sure you ran the commands against the right directory?
      The Windows.old folders shouldn’t be referenced or used by any active users or processes.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s