We've only included freeware registry cleaner programs in this list—in other words, only completely free registry cleaners. Any registry cleaner program that charges a fee of any kind (e.g., shareware, trialware) will not be included here.If a free registry cleaner has started to charge and we haven't removed it yet, please let me know. To Open and Use Disk Cleanup 1. Press the Windows + R keys to open the Run dialog, type cleanmgr or cleanmgr /lowdisk (all items checked), and click/tap on OK to open Disk Cleanup.
With the ability to disable or move the package cache for Visual Studio 2017 and other products installed with the new installer, packages are removed for whatever instance(s) you are installing, modifying, or repairing.
If you have a lot of instances and want to clean all of them up easily from the command line – perhaps scripting it for users in an organization – you can combine tools such as vswhere or the VSSetup PowerShell module with the installer at %ProgramFiles(x86)%Microsoft Visual StudioInstallervs_installer.exe.
Batch script with vswhere
You can get the installation path for all instances and call the installer for each to disable the cache (only necessary once, but for simplicity of the script we’ll pass it for each instance) and modify – which will basically just remove package payloads – or re-enable the cache and repair the packages to re-download packages.
Note that the following sample is intended for use within a batch script. If typing on the command line only use one “%”. Run this within an elevated command prompt to avoid being prompted to elevate each time vs_installer.exe is launched.
PowerShell script with VSSetup
![Cleaner Cleaner](/uploads/1/2/5/8/125829484/684739990.png)
While you can also use vswhere within PowerShell easily (e.g.
vswhere -format json | convertfrom-json
), this example uses the VSSetup PowerShell module you can easily obtain in Windows 10 with: install-module -scope currentuser VSSetup
.![Use Use](/uploads/1/2/5/8/125829484/285006824.png)
Put the following example into a script and run it from an elevated PowerShell host to avoid being prompted to elevate each time vs_installer.exre is launched.
Both of these examples will remove all instances’ packages or put them pack depending on your command line arguments you would pass to the scripts.