Как удалить папку windows old в windows server 2012 r2

На файловом сервере Был сделан upgrade с версии Windows Server 2008 R2 на Windows Server 2012 R2. Все прошло успешно. После рестарта старая версия была перемещена в папку Windows.old.
  • Remove From My Forums
  • Вопрос

  • На файловом сервере Был сделан upgrade с версии Windows Server 2008 R2 на Windows Server 2012 R2. Все прошло успешно. После рестарта старая версия была перемещена в папку Windows.old. 

    Как удалить папку (Более 25 гигабайт) чтобы освободить место на загрузочном диске. Утилиты clenmgr.exe нет, а просто удалить не хватает прав. 

    Посоветуйте пожалуйста как корректно избавиться от папки Windows.old?

Ответы

  • Здравствуйте!

    У Вас скорее всего нет прав.

    Если Вы уверены, что хотите удалить данную папку на свой страх и риск, то:

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

    • Изменено

      23 ноября 2015 г. 12:30

    • Предложено в качестве ответа
      Zaza Abramov
      29 ноября 2015 г. 22:56
    • Помечено в качестве ответа
      Petko KrushevMicrosoft contingent staff, Moderator
      30 ноября 2015 г. 12:25

Skip to content

How to remove the windows.old is still an issue on some servers. Well it is easy to remove but you will need a reboot.

How do I remove the Windows.old folder? <remove the windows.old>image

What you need to do is install the Desktop Experience Go to the server manager and add new feature

Find the Desktop Experience and add this you will need a reboot.

How do I remove the Windows.old folder? image

Get-WindowsFeature *desk*

install-WindowsFeature -Name Desktop-Experience –IncludeAllSubFeature

How do I remove the Windows.old folder?

Now that we installed the Desktop Experience there is a new option if you do properties on the C drive.

imageHow do I remove the Windows.old folder?

Press the Disk Cleanup and a quick scan will find all the info that we need to remove the previous Windows installation.

imageHow do I remove the Windows.old folder?

Now the Cleanup is running and after this I have 28.5 GB free space

How do I remove the Windows.old folder?image

Robert Smit is Senior Technical Evangelist and is a current Microsoft MVP in Clustering as of 2009.
Robert has over 20 years experience in IT with experience in the educational, health-care and finance industries.
Robert’s past IT experience in the trenches of IT gives him the knowledge and insight that allows him to communicate effectively with IT professionals
who are trying to address real concerns around business continuity, disaster recovery and regulatory compliance issues. Robert holds the following certifications:
MCT — Microsoft Certified Trainer, MCTS — Windows Server Virtualization, MCSE, MCSA and MCPS. He is an active participant in the Microsoft newsgroup community and is currently focused on Hyper-V, Failover Clustering, SQL Server, Azure and all things related to Cloud Computing and Infrastructure Optimalization.
Follow Robert on Twitter @ClusterMVP
Or follow his blog https://robertsmit.wordpress.com
Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Robert is also capable of transferring his knowledge to others which is a rare feature in the field of IT. He makes a point of not only solving issues but also of giving on the job training of his colleagues.

A customer says » Robert has been a big influence on our technical staff and I have to come to know him as a brilliant specialist concerning Microsoft Products. He was Capable with his in-depth knowledge of Microsoft products to troubleshoot problems and develop our infrastructure to a higher level. I would certainly hire him again in the future. »

Details of the Recommendation: «I have been coordinating with Robert implementing a very complex system. Although he was primarily a Microsoft infrastructure specialist; he was able to understand and debug .Net based complext Windows applications and websites. His input to improve performance of applications proved very helpful for the success of our project
View all posts by Robert Smit [MVP]

Вот правильный способ и корректная последовательность команд для удаления папки windows.old на серверных системах Windows:

takeown /F C:windows.old /R /D Y

cacls c:Windows.old*.* /T /grant administrators:F

rmdir /S /Q c:Windows.old

Правильное удаление windows.old после апгрейда на Windows Server 2012 R2: Один комментарий

  1. takeown /F C:windows.old /R /D Y — в пути C:windows.old пропущен , очевидно

    Ответить

Добавить комментарий

Введите свой комментарий…

Заполните поля или щелкните по значку, чтобы оставить свой комментарий:

Gravatar

E-mail (обязательно) (Адрес никогда не будет опубликован)

Имя (обязательно)

Сайт

Логотип WordPress.com


Для комментария используется ваша учётная запись WordPress.com.
( Выход / 
Изменить )

Фотография Twitter


Для комментария используется ваша учётная запись Twitter.
( Выход / 
Изменить )

Фотография Facebook


Для комментария используется ваша учётная запись Facebook.
( Выход / 
Изменить )

Отмена

Connecting to %s

Уведомлять меня о новых комментариях по почте.

Уведомлять меня о новых записях по почте.

  • Remove From My Forums
  • Question

  • Hi All,

    Some time ago a Server that I administer underwent an inplace upgrade to Windows Server 2012 R2.

    At the time a ‘Windows.old’ folder was generated on C drive. I can see that the last modified date on the folder is 22/10/2013 and I now want to remove it (to recover 15 Gigs of storage space).

    I have two questions about the ‘Windows.old’ folder;

    1). Can this be removed without affecting the current OS (e.g.: will not having access to C:Windows.oldWindowsWinSxS affect Windows patching / updating moving forward)?

    2). (assuming that point 1 is a resounding NO) Is there a best practise for removal of the ‘Windows.old’ folder?

    Any help will be greatly appreciated.

    Kind Regards,

    Davo

  • Remove From My Forums
  • Question

  • Hi All,

    Some time ago a Server that I administer underwent an inplace upgrade to Windows Server 2012 R2.

    At the time a ‘Windows.old’ folder was generated on C drive. I can see that the last modified date on the folder is 22/10/2013 and I now want to remove it (to recover 15 Gigs of storage space).

    I have two questions about the ‘Windows.old’ folder;

    1). Can this be removed without affecting the current OS (e.g.: will not having access to C:Windows.oldWindowsWinSxS affect Windows patching / updating moving forward)?

    2). (assuming that point 1 is a resounding NO) Is there a best practise for removal of the ‘Windows.old’ folder?

    Any help will be greatly appreciated.

    Kind Regards,

    Davo

  • Remove From My Forums
  • Question

  • Windows Server 2008 R2 upgraded to 2012 fine and I don’t want to go back.  I’d like to reclaim the space utilized by Windows.old.  Simply right clicking on it and choosing to delete it is blocked by security.  Is there another way? 
    How can this be done?  What tool exists to make this a simple process?


    Dale Unroe

    • Edited by

      Thursday, September 6, 2012 8:38 PM

Answers

  • thanks but Option 1 — Windows 2012 doesn’t have cleanmgr.exe application, and Option 2 — Access Denied

    …did not work

    Option 3 is not possible from this remote location and is a PITA in any case to boot in to Repair mode just to delete a directory

    …so I improvised and claimed ownership of the parent folder as well as ensured I had Full Control and that all child folders and files were altered to inherit these attributes — at that point I deleted the folder successfully


    Dale Unroe

    • Marked as answer by
      Dale DU-IT
      Friday, September 7, 2012 4:08 AM

  • Another obvious need missed by Microsoft. Honestly, did no one say «hey, I think the server admins want to recover 10GB of C drive space after an upgrade»?

    • Marked as answer by
      Dale DU-IT
      Wednesday, November 12, 2014 7:56 PM

  • Remove From My Forums
  • Question

  • Windows Server 2008 R2 upgraded to 2012 fine and I don’t want to go back.  I’d like to reclaim the space utilized by Windows.old.  Simply right clicking on it and choosing to delete it is blocked by security.  Is there another way? 
    How can this be done?  What tool exists to make this a simple process?


    Dale Unroe

    • Edited by

      Thursday, September 6, 2012 8:38 PM

Answers

  • thanks but Option 1 — Windows 2012 doesn’t have cleanmgr.exe application, and Option 2 — Access Denied

    …did not work

    Option 3 is not possible from this remote location and is a PITA in any case to boot in to Repair mode just to delete a directory

    …so I improvised and claimed ownership of the parent folder as well as ensured I had Full Control and that all child folders and files were altered to inherit these attributes — at that point I deleted the folder successfully


    Dale Unroe

    • Marked as answer by
      Dale DU-IT
      Friday, September 7, 2012 4:08 AM

  • Another obvious need missed by Microsoft. Honestly, did no one say «hey, I think the server admins want to recover 10GB of C drive space after an upgrade»?

    • Marked as answer by
      Dale DU-IT
      Wednesday, November 12, 2014 7:56 PM

Windows 11 Windows 10, version 20H2, all editions Windows Server, version 20H2, all editions Windows 10, version 21H1, all editions Windows 10, version 21H2, all editions Еще…Меньше

Сводка

Папка Windows.old содержит предыдущую версию Windows на вашем устройстве. Если вы хотите удалить предыдущую версию после обновления, проще всего использовать служба хранилища в приложении Параметры. Выполните действия, которые приведены ниже для вашей версии Windows операционной системы.

Windows 10

  1. Откройте Параметры.

  2. Выберите Система.

  3. Выберите служба хранилища.

  4. В разделе служба хранилища, выберитеИзменить автоматическое освободить место.

    альтернативный текст

  5. В разделе Освободить место сейчас, выберите удалить предыдущую версию Windows.

    альтернативный текст

  6. Затем выберите кнопку Очистить .

Windows 11

  1. Откройте Параметры.

  2. Выберите Система.

  3. Выберите служба хранилища.

  4. Выберите Рекомендации по очистке

  5. Выберите предыдущий Windows установки.

    альтернативный текст

  6. Затем выберите кнопку Очистка, которая отображает размер файла.

Нужна дополнительная помощь?

Сначала я попытался скопировать и запустить cleanmgr.exe (инструмент очистки диска), но у него слишком много зависимостей от библиотек DLL, которых нет в Core / Hyper-V Server.

Поэтому вместо этого я удалил каталог вручную.

Сначала я удалил все точки соединения и символические ссылки. Для этого я использовал junction.exe из SysInternals. Скопируйте исполняемый файл в каталог по вашему пути. Я запустил его, чтобы получить список всех соединений:

c:toolsjunction.exe -s -q C:windows.old > %temp%junc.txt

Я открыл PowerShell:

start powershell.exe

и запустил следующий скрипт, чтобы найти соответствующие строки и снова выполнить junction.exe:

 foreach ($line in [System.IO.File]::ReadLines("$env:tempjunc.txt"))
 {
     if ($line -match "^\\")
     {
         $file = $line -replace "(: JUNCTION)|(: SYMBOLIC LINK)",""
         & c:toolsjunction.exe -d "$file"
     }
 }

Это удалило все точки соединения и единственную символическую ссылку в моей системе.

Вернувшись в cmd.exe, я выполнил три команды, чтобы очистить разрешения и удалить все файлы:

 takeown /F C:windows.old /R /D Y
 cacls C:windows.old /T /G Everyone:F
 rd /s /q C:windows.old

В моем тесте я установил новый сервер Hyper-V 2012, затем обновил до 2012 R2, Windows.old теперь не работает, и система работает нормально со всеми старыми целевыми объектами соединения.

Понравилась статья? Поделить с друзьями:
  • Как удалить папку windows old в windows 11 после обновления
  • Как удалить папку windows old в win 10
  • Как удалить папку windows old windows 10 через командную строку
  • Как удалить папку windows old 001
  • Как удалить папку windows old 000 на windows 10