Windows uses different tools and applications. Windows provides recovery mechanisms to easily stand up the system again in a crash. Also while updating windows operating system there will a lot of backup and recovery files created and saved. All of these data is saved into folder named WinSxS
in the system root folder Windows
.
Windows使用不同的工具和应用程序。 Windows提供了恢复机制,可以轻松地在崩溃中再次站起来。 另外,在更新Windows操作系统时,将创建和保存许多备份和恢复文件。 所有这些数据都保存到系统根文件夹Windows
名为WinSxS
的文件夹中。
Generally the contents of this folder is assumed unnesecary and can be deleted safely. There are different ways to delete all these files in a safe way. Actually just deleting with rm
command will work but there is a possibility for future problems. We will clear WinSxS
folder by staying safe part.
通常,此文件夹的内容被假定为无关内容,可以安全地删除。 有多种安全删除所有这些文件的方法。 实际上,仅使用rm
命令删除即可,但将来可能会出现问题。 我们将保持安全状态,以清除WinSxS
文件夹。
使用磁盘清理器GUI (Using Disk Cleaner GUI)
The more user friendly and easy way is using Disk Cleaner which is a GUI tool to clean unnecessary data and temp file from Windows operating system. Just put following command to the windows run .
更加用户友好和简便的方法是使用“磁盘清理器”,它是一个GUI工具,可以从Windows操作系统清除不必要的数据和临时文件。 只需在Windows下运行以下命令即可。
cleanmgr.exe

Following window will appear. We will select Setup Log Files
, System error memory dump files
and Temproray Files
and click OK
.
将出现以下窗口。 我们将选择Setup Log Files
, System error memory dump files
和Temproray Files
,然后单击OK
。

This will start a disk clean up process and remove all selected unused files and folder. Also a form like below will be shows to provides process status.
这将启动磁盘清理过程,并删除所有选定的未使用文件和文件夹。 还将显示如下表格,以提供过程状态。

使用Dism.exe (Using Dism.exe)
Dism is a tool for deployment image servicing and management. As its management deployment it can clear deployment and recovery related temporary and unused files like below. In order to use Dism
we will open a command line or MS-DOS with cmd
. This command line should have Administrator privileges because dism
requires these privileges.
Dism是用于部署映像服务和管理的工具。 作为其管理部署,它可以清除与部署和恢复相关的临时和未使用文件,如下所示。 为了使用Dism
我们将使用cmd
打开命令行或MS-DOS。 此命令行应具有管理员权限,因为dism
需要这些权限。
> Dism.exe /online /Cleanup-Image /StartComponentCleanup

翻译自: https://www.poftut.com/save-space-clearing-winsxs-windows/