How to delete C:\Windows.Old folder witout using disk cleanup

In the Disk Cleanup dialog box, I don’t see the option to delete Previous Windows Installations. How do I manually delete the C:\Windows.Old folder.

 Also, what are the three command lines needed to delete the folder?

 

Question Info


Last updated May 27, 2020 Views 127,192 Applies to:
Answer
Answer

Hi,

The option is shown as Previously Windows Installations.

How to Delete and Remove the Windows.old Folder on Vista or Windows 7
http://www.kodyaz.com/articles/delete-windows-old-removal.aspx

===============================================

If needed :

1. Open an Elevated Command Prompt

Start - type in Search box -> CMD     find at top - Right Click on - RUN AS ADMIN


How to Open a Elevated Command Prompt in Windows 7
http://www.sevenforums.com/tutorials/783-elevated-command-prompt.html



2. The Prompt probably looks like C:\Windows\System32>

Type this at the prompt and then hit ENTER


CD\


Now the prompt should look like C:\>



3: Type this at the prompt and then hit ENTER

DIR Windows.old


Should look like C:\>DIR Windows.old   

It should return

Directory of C:\Windows.old

and show the contents of Windows.old


That is just to make sure the Windows.old  folder is under C: (the C Drive) - if not STOP



4.
 Type this at the prompt and then hit ENTER


 Attrib -r -a -s -h C:\Windows.old /S /D

Should look like C:\>Attrib -r -a -s -h C:\Windows.old /S /D
(there are SPACES between Attrib and -r and -a and -s and -h and C:\Windows.old and /S
and /D). The C:\ is the drive Windows.old is located on.

It should return you to the prompt C:\   if it shows and ERROR then STOP - check the command
and if it was typed correctly you are not in the correct spot. You may need to run the TAKEOWN
command :

TAKEOWN /f Windows.old /a /r

and repeat Step 4 - were you using an Elevated Command Prompt? Are you logged to an
ADMIN account?

5.
Type this at the prompt and then hit ENTER

RD /s Windows.old

Should look like C:\>RD /s Windows.old
(there are SPACES between RD and /s and Windows.old )

Will return   Windows.old, are your sure Y/N   type Y

(If you get a message that you do not have Ownership Rights then issue this command
and hit ENTER

TAKEOWN /f Windows.old /a /r

and repeat Step 5 - were you using an Elevated Command Prompt? Are you logged to an
ADMIN account?


6: Type this at the prompt and then hit ENTER

DIR Windows.old


Should look like C:\>DIR Windows.old    -    and hit ENTER


It should return

Directory of C:\

File Not Found


Which confirms it is gone.


7.
Close the COMMAND window

Hope this helps.


Rob Brown - Microsoft MVP <- profile - Windows Expert - Consumer : Bicycle - Mark Twain said it right.

Rob Brown - Microsoft MVP - Windows and Devices for IT 2010 - current
Windows Insider MVP 2016 - current

116 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.