Is there a possibility to remove the old versions of installation packages from the layout folder of Visual Studio 2017 offline installation? This folder needs a lot of memo
You can use the new --clean option. You'll need the file path(s) to catalog manifest(s) that contain those obsolete packages. You can find the catalog manifests in an Archive folder in the offline layout cache.
They are saved there when you update a layout. In the "Archive" folder, there is one or more GUID named folders, each of which contains an obsolete catalog manifest. The number of GUID folders should be the same as the number of updates made to your offline cache.
A few files are saved inside each GUID folder. The two files of most interest are a catalog.json file and a version.txt file. The catalog.json file is the obsolete catalog manifest you'll need to pass to the --clean option. The version.txt file contains the version of this obsolete catalog manifest. Based on the version number, you can decide whether you want to remove obsolete packages from this catalog manifest. You can do the same as you go through the other GUID folders. After you make the decision on the catalog(s) you want to clean, run the --clean command by supplying the files paths to these catalogs.
Examples:
vs_enterprise.exe --layout --clean …
vs_enterprise.exe --layout --clean --clean …
You can also invoke vs_enterprise.exe inside the Here's an example:
c:\VS2017Layout\vs_enterprise.exe --layout c:\VS2017Layout --clean c:\VS2017Layout\Archive\1cd70189-fc55-4583-8ad8-a2711e928325\Catalog.json --clean c:\VS2017Layout\Archive\d420889f-6aad-4ba4-99e4-ed7833795a10\Catalog.json
When you execute this command, Setup analyzes your offline cache folder to find the list of files that it will remove. You will then have a chance to review the files that are going to be deleted and confirm the deletions.