Share via


How to Remove a Package From Server Core for Windows Server 2008 R2

6/22/2010

Unlike in a full installation of Windows Server, on Server Core you can remove packages to free disk space and to ensure that an Administrator cannot add a role or feature, or otherwise change the function of your server appliance. For information about packages that you can remove, see Removable Packages for Server Core for Windows Server 2008 R2.

Important

Package removal is a one-way operation. After you remove a server role or feature, you cannot restore it. If you realize later that you need the server role or feature that you removed, you must reinstall the operating system.

In Server Core for Windows Server 2008 R2, removing the following packages frees the most disk space:

  • .NET Framework packages (~500 MB)
  • WoW64 packages (~250 MB)
  • Input method editor (IME) packages (~200 MB)

To remove a package from Server Core for Windows Server 2008 R2

  1. Open <System drive>:\Windows\Servicing\Packages.

  2. Run dir *coreedition*.mum /w.

  3. From the output of the dir command, copy the file name, excluding the file name extension; for example:

    Microsoft-Windows-ServerEnterpriseCoreEdition~31bf3856ad364e35~amd64~~6.1.7000.0

  4. Run dism /online /get-features /packagename: <CoreEditionPackage>, where <CoreEditionPackage> is the file name that you copied.

  5. Run dism /online /disable-feature /packagename: <CoreEditionPackage> /featurename: <NameToRemove>.

    For example, you can use the following command to remove the IIS Web Server package from Server Core for Windows Server 2008 R2 Enterprise Edition:

    dism /online /disable-feature /packagename:Microsoft-Windows-ServerEnterpriseCoreEdition~31bf3856ad364e35~amd64~~6.1.7600.16385 /featurename:Microsoft-Windows-IIS-WebServer-Core-Package
    
  6. To free disk space from the Server Core disk image, run the following command: dism /online /disable-feature /packagename: ServerStandardCoreEdition /featurename: <NameToRemove>.

See Also

Reference

Removable Packages for Server Core for Windows Server 2008 R2