Site icon TechGit

Remove the Windows.old folder manually

Windows creates the folder Windows.old on a PC running Windows when you upgrade the PC to a new version of the operating system.

The Windows.old folder contains files and folders of the old installation of Windows, and the main reason it is there is that it is used to restore the old system if the user wants to go back to it.

This folder may take up a sizeable amount of space, but will get deleted automatically usually by Windows after a set period of time.

Windows users may also use the disk cleanup tool to remove the folder as described here. Sometimes however it happens that the folder and its content is not removed, and that a manual removal does not work either.

When you try to delete the folder manually in Explorer, you get permission errors as the folder is associated with SYSTEM and not a user or administrator account.

What happens usually is that you get a permission request first to run the operation with administrative privileges, and then the Folder Access Denied error.

folder access denied

Remove the Windows.old folder manually

You need to run the following commands remove the Windows.old folder manually.

  1. Open an elevated command prompt. EAsiest way to do so is to tap on Windows, type cmd.exe, hold down the Shift-key and the Ctrl-key, and launch the elevated command prompt with a tap on the Enter-key.
  2. takeown /F c:Windows.old* /R /A /D Y
  3. cacls c:Windows.old*.* /T /grant administrators:F
  4. rmdir /S /Q c:Windows.old

Lets take a closer look at the commands to better understand what they do:

takeown /f c:Windows.old* /r /a /d y

Takeown can be used to make the administrators group the owner of a file or directory.

cacls c:Windows.old*.* /t /grant administrators:f

This command displays or modifies DACL (discretionary access control list) files.

rmdir /s /q c:Windows.old

The command removes a directory.

Resources:

 

The post Remove the Windows.old folder manually appeared first on gHacks Technology News.

FacebookTwitterTumblrRedditLinkedInHacker NewsDiggBufferGoogle ClassroomThreadsXINGShare
Exit mobile version