关于ECS Windows 2012 winsxs目录清理的图文详解

黄舟
Release: 2018-05-12 09:47:25
Original
4574 people have browsed it

注:本文中提及的操作需要一定专业知识水平,误操作可能对 Windows 操作系统带来的系统启动失败以及数据丢失的风险。请您务必在采用本文操作前,创建系统盘和数据盘快照,以便在问题情况下回滚来找回丢失的数据。

问题背景

Windows 2012 WincSXS 占用空间比较大,需要清理 WinSXS 包含所有版本的service pack 和 hotfix, 方便安装历史查询以及后续的升级/卸载。 时间久了就会造成WinSXS 空间比较大。 

解决方案

1. 由于hard Link 的存在,explore 看到的文件大小不一定是准确的,使用下面的命令查看实际的使用大小:

disk.PNG

如果显示component store cleanup recommended 显示为yes, 建议执行下面的步骤cleanup

shared with windows 是安全文件。 Backups and disbled features 和 cache and temporary data 是可以清理的

2. Cleanup 命令为:

Dism.exe /online /Cleanup-Image /StartComponentCleanup
Copy after login

注意: 可以考虑加参数/SPSuperseded 或/ResetBase

如果加/SPSuperseded, 那么已经安装service pack 就不能卸载了

如果加/ResetBase, 那么已经安装的service pack 和 hotfix 都不能卸载了

其他建议

1. 也可以使用cleanmgr.exe进行清理 (此方法默认只适用win 7, 其他版本需要安装desktop experience )

2. Windows 2012 r2 可以通过powershell 删除不需要的role/features.

但是后续恢复已经删除的role/features 会比较麻烦。 详细请参考

阅读须知

本文仅供用户使用 ECS Windows 时参考,文中引用的微软官方链接,版权归属微软。请注意文章适用的操作系统范围,以及微软 Windows 产品迭代或者文档未及时更新可能带来的问题,阿里云官方不对引用的微软官方链接内容负责。

The above is the detailed content of 关于ECS Windows 2012 winsxs目录清理的图文详解. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!