尽管在Windows中安装更新是一个简单的过程,但管理这一切的后台机制却相当复杂。Internet上也有很多关于如何处理与Windows Update相关的问题的错误信息。
最大的误解之一是,只需删除存储在C:\WindowsSoftwareDistribution文件夹即可一次安装所有Windows更新。这是完全错误的。是的,您可能会节省一些空间(从 500 MB 到几 GB 不等),但删除文件夹不会删除任何已安装的更新。
此外,除非绝对需要,否则删除SoftwareDistribution 文件夹是个坏主意。(SoftwareDistribution folder)有一个名为DataStore的子文件夹,其中包含所有可用(DataStore)Windows 更新(Windows Updates)的大型数据库。这个数据库的大小可能有几百MB(MBs)。删除此数据库只会删除计算机的Windows 更新历史记录(Windows Update history)。
为了向自己证明这一点,我做了一个测试。我打开 Control Panel,单击Windows Update,然后单击左侧菜单中的View Update History 。
此屏幕只为您提供已安装更新的完整列表,包括状态(Status)、重要性(Importance)和安装日期(Date Installed)。当我们删除SoftwareDistribution 文件夹(SoftwareDistribution folder)时,此对话框将完全为空,就好像您从未安装任何更新一样。在我向您展示之前,请单击顶部的已安装更新链接,它会告诉您如何删除更新。(Installed Updates)
如您所见,我目前为Office、Windows、Silverlight等安装了数百个更新。现在,如果您按照以下说明删除文件夹,您可以返回查看更新历史记录(View Update History)对话框,您会看到它现在空的。
但是,如果您再次单击“已安装的更新(Installed Updates)”,您将看到之前列出的所有更新仍然在此处列出。这是因为我们只是删除了更新的日志历史记录,而不是实际的更新。
您可以在此对话框中实际卸载更新,但一次只能卸载一个。只需单击(Simply click)更新,然后单击卸载(Uninstall)。不幸的是,除非您使用系统还原(Restore),否则无法一次删除所有更新。
如果您使用系统还原(Restore)并将计算机还原到以前的还原点,则在该(restore point)还原点(restore point)之后安装的任何更新都将消失。但是,要删除所有更新,您需要在安装操作系统后立即创建一个还原点。(restore point)即使在那个时候创建了一个还原点(restore point),旧的通常也会随着时间的推移而被删除,以为新的还原点(restore point)腾出空间。
不过,如果您有大量空间分配给System Restore,您也许可以一次回滚几个月的更新。
删除文件夹的内容后,您需要通过控制面板重新访问(Control Panel)Windows Update并检查更新。整个数据库将从头开始构建,您可能会注意到 Windows 长时间显示正在检查更新。(Checking for updates)这是因为必须再次下载适用于操作系统的每个更新的列表,然后与系统上当前安装的更新进行比较。
删除 SoftwareDistribution 文件夹
要删除此文件夹,您首先必须停止 Windows 中的Windows Update(Windows Update)和BITS服务。为此,请单击开始 (Start )并在搜索框中输入services.msc 。
接下来,右键单击Windows Update 服务并单击Stop。对 后台智能传输服务 (BITS)(Background Intelligent Transfer Service (BITS))服务也执行相同的操作。
现在导航到如下所示的以下文件夹,您将看到那里列出了几个文件夹。我们将讨论的主要是Downloads和DataStore。
C:\Windows\SoftwareDistribution
如果你只是想重新获得硬盘空间(drive space),那么你应该只删除下载(Download)文件夹的内容,尽管理论上这应该没有必要。下载文件夹(Download folder)实际上包含所有已下载但尚未安装的更新。安装后,更新将在 10 天内删除。因此,理论上,在您安装完所有Windows更新后,该文件夹的大小应该会很快缩小。
DataStore文件夹包含具有计算机的完整Windows 更新(Windows update)历史记录的数据库。删除后,更新历史对话框(history dialog)将像上面显示的那样为空白,但您的所有更新仍将保留。你真的不应该删除DataStore 文件夹(DataStore folder),除非你被告知这样做或者Windows 更新(Windows Update)完全损坏和配置错误。
请注意,您可能无法删除某些文件夹和ReportingEvents 文件(ReportingEvents file)。在无法删除文件夹的情况下,只需打开文件夹并删除其中的所有内容即可。对我来说,尝试删除DataStore 文件夹(DataStore folder)时出现错误,所以我只是进入文件夹并删除了数据库文件(database file)和文件夹中的所有其他文件。
检查 Windows 更新
如果您确实删除了SoftwareDistribution 文件夹(SoftwareDistribution folder),您将需要再次转到Windows Update以检查更新。它将显示您从未执行过更新检查,因为更新历史记录现已消失。
单击检查更新(Check for updates)按钮并准备等待一段时间,因为正在重新创建数据库。
结论
所以这里的要点是,除非您在系统上保存了一个非常旧的还原点(restore point),否则您无法真正立即摆脱所有Windows 更新。(Windows Updates)其次,如果您希望节省空间,或者只是安装所有最新更新并等待 10 天,看看它们是否被自动删除,您应该只删除SoftwareDistribution文件夹中的Downloads文件夹。(Downloads)
第三,如果Windows Update(Windows Update)确实出现问题,例如几个月没有显示任何新更新等,您应该只删除DataStore文件夹。希望这能让您更好地了解(DataStore)Windows Update的工作原理以及文件的存储方式。如果您有任何问题,请发表评论。享受!
How to Uninstall and Reinstall Windows Updates
Even though installing updates in Windows is an easy process, the mechanism in the background that manages it all is fаirly complicated. There is alsо a lot of misіnformation on the Internet abоut how to deal with problems relating to Windows Updatе.
One of the biggest misconceptions is that all Windows updates can be installed at once by simply deleting the SoftwareDistribution folder stored in C:\Windows. This is completely wrong. Yes, you might save some space (anywhere from 500 MB to several GB’s), but deleting the folder will not remove any installed update.
In addition it’s a bad idea to delete the SoftwareDistribution folder unless it is absolutely required. There is a subfolder called DataStore that has a large database of all the Windows Updates available. This database will probably be a couple of hundred MBs in size. Deleting this database simply removes the Windows Update history for the computer.
To prove this to myself, I did a test. I opened Control Panel, clicked on Windows Update and then clicked on View Update History in the left hand menu.
This screen just gives you a full list of installed updates with the Status, Importance and Date Installed. When we delete the SoftwareDistribution folder, this dialog will be completely empty as if you have never installed any updates. Before I show you that, click on the Installed Updates link at the top where it tells you how to remove an update.
As you can see, I have a couple of hundreds updates currently installed for Office, Windows, Silverlight, etc. Now if you follow the instructions below for deleting the folder, you can go back to View Update History dialog and you will see it’s now empty.
However, if you click on Installed Updates again, you will see that all the updates that were listed before and still listed there. This is because we simply deleted the log history of the updates and not the actual updates.
This dialog is where you can actually uninstall an update, but only one at a time. Simply click on an update and then click Uninstall. Unfortunately, there is no way to remove all updates at once unless you use System Restore.
If you use System Restore and restore the computer to a previous restore point, any updates that were installed after that restore point will be gone. To remove all updates, though, you would need a restore point created right after the OS was installed. Even if a restore point was created at that point, older ones normally get deleted over time to make space for newer restore points.
Still, if you have a lot of space allocated to System Restore, you might be able to roll back a couple months worth of updates at once.
Once you delete the contents of the folder, you will need to revisit Windows Update via Control Panel and check for updates. The entire database will be built from scratch and you may notice that Windows shows Checking for updates for a very long time. This is because a list of every update applicable to the OS has to be downloaded again and then compared to the updates currently installed on the system.
Delete SoftwareDistribution Folder
In order to remove this folder, you first have to stop the Windows Update and BITS services in Windows. To do this, click on Start and type in services.msc into the search box.
Next, right-click on the Windows Update service and click on Stop. Do the same thing for the Background Intelligent Transfer Service (BITS) service too.
Now navigate to the following folder shown below and you will see several folders listed there. The main ones that we will talk about are Downloads and DataStore.
C:\Windows\SoftwareDistribution
If you are trying to regain hard drive space only, then you should only delete the contents of the Download folder, though in theory this should not really be necessary. The Download folder actually holds all the updates that have been downloaded, but not yet installed. Once they are installed, the updates are removed within 10 days. So theoretically, that folder should shrink in size soon after you have installed all the Windows updates.
The DataStore folder contains the database with the full Windows update history for the computer. Once it is deleted, the update history dialog will be blank like I had shown above, but all your updates will still remain. You should really never delete the DataStore folder unless you are told to do so or if Windows Update is completely corrupt and misconfigured.
Note that you may not be able to delete certain folders and the ReportingEvents file. In the case where you can’t delete a folder, just open the folder and delete all the contents inside. For me, I got an error when trying to delete the DataStore folder, so I just went inside the folder and deleted the database file and all the other files in the folder.
Check for Windows Updates
If you did remove the SoftwareDistribution folder, you will want to go to Windows Update again to check for updates. It will show that you have never perform a check for updates since the update history is now gone.
Click the Check for updates button and be prepared to wait a while as the database is being recreated.
Conclusion
So the main point here is that you cannot really get rid of all Windows Updates at once unless you have a really old restore point saved on the system. Secondly, you should only delete the Downloads folder in the SoftwareDistribution folder if you are looking to save space or simply install all the latest updates and wait 10 days to see if they are removed automatically.
Thirdly, you should only delete the DataStore folder if something is really wrong with Windows Update like not showing any new updates for several months, etc. Hopefully, this gives you a better understanding of how Windows Update works and how the files are stored. If you have any questions, post a comment. Enjoy!