:: Windows 的更新下载到的路径
del /q "%Windir%\SoftwareDistribution\Download\*"
for /d %%x in ("%Windir%\SoftwareDistribution\Download\*") do @
rd /s /q "%%x"
:: Edge 自动更新的安装包
del /q "%ProgramFiles(x86)%\Microsoft\EdgeUpdate\Download\*"
for /d %%x in ("%ProgramFiles(x86)%\Microsoft\EdgeUpdate\Download\*") do @
rd /s /q "%%x"
:: Office 的更新文件
del /q "%ProgramFiles%\Microsoft Office\Updates\Download\PackageFiles\*"
for /d %%x in ("%ProgramFiles%\Microsoft Office\Updates\Download\PackageFiles\*") do @
rd /s /q "%%x"
del /q "%ProgramFiles(X86)%\Microsoft Office\Updates\Download\PackageFiles\*"
for /d %%x in ("%ProgramFiles(X86)%\Microsoft Office\Updates\Download\PackageFiles\*") do @
rd /s /q "%%x"
:: Chromium 系浏览器都可以清理的 cache
del /q "%localappdata%\Microsoft\Edge\User Data\Default\Cache\Cache_Data\*"
for /d %%x in ("%localappdata%\Microsoft\Edge\User Data\Default\Cache\Cache_Data\*") do @
rd /s /q "%%x"
del /q "%localappdata%\Microsoft\Edge\User Data\Default\Code Cache\js\*"
for /d %%x in ("%localappdata%\Microsoft\Edge\User Data\Default\Code Cache\js\*") do @
rd /s /q "%%x"
del /q "%localappdata%\Microsoft\Edge\User Data\Default\Service Worker\CacheStorage\*"
for /d %%x in ("%localappdata%\Microsoft\Edge\User Data\Default\Service Worker\CacheStorage\*") do @
rd /s /q "%%x"
:: 清理 WinSxS 文件夹
rem %windir%\system32\Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
:: 清理过时的安装包
::
https://sourceforge.net/projects/patchcleaner/files/PatchCleaner_Portable/v1.4.2.0/:: 清理过时的驱动
::
https://github.com/lostindark/DriverStoreExplorer/releases