You can use the new option --clean . You will need the file paths to the directory manifests that contain these legacy packages. You can find the directory in the Archive folder in an offline layout.
They are saved there when you update the layout. The Archive folder contains one or more folders with the name GUID , each of which contains an outdated directory manifest. The number of GUID folders must match the number of updates made to the offline cache.
Multiple files are saved in each GUID folder. Of greatest interest are the two catalog.json and version.txt files. The catalog.json file is an obsolete catalog manifest that you need to pass to the --clean option. Another version.txt file contains a version of this deprecated 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 in other GUID folders. After deciding on the directories you want to clear, run the --clean command, specifying the file paths to these directories.
Examples:
vs_enterprise.exe --layout <layoutDir> --clean <file-path-of-catalog1> <file-path-of-catalog2> β¦ vs_enterprise.exe --layout <layoutDir> --clean <file-path-of-catalog1> --clean <file-path-of-catalog2> β¦
You can also call vs_enterprise.exe inside <layoutDir>. 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 executing this command, the installation program analyzes your offline cache folder to find a list of files that it will delete. After that, you will have the opportunity to view the files that will be deleted and confirm the deletion.
Arman
source share