As applications are created, the various deletions and revisions of packages can leave traces on the distribution points. For this, the contentlibrarycleanup.exe utility allows cleaning. Discover how to clean up distribution points with this tool.
You can launch the cleaning tool from the distribution point or remotely from any computer.
You must be full admin to have the right to delete folders from the distribution point.
Launching the contentlibrarycleanup tool in What-if (scenario mode)
Starting the scan
The What-If mode of Content Library Cleanup allows to scan the distribution point and to simulate the cleaning of it. It is strongly recommended to start with this mode to detect possible errors.
Open a console with administrator rights, the tool can be found in “F:Program Files\Microsoft Configuration Manager\cd.latest\SMSSETUP\TOOLS\ContentLibraryCleanup“.
Type contentlibrarycleanup.exe /dp DPNAME. The tool then asks if you really want to run the scenario mode, type “y” to validate.
Afterwards, depending on the number of packages, the operation may take a little time.
At the end of the scan, an error message may appear indicating that a package is incorrectly installed on the distribution point and needs to be redistributed.
To get the list of packages to be redistributed on the distribution point, open the SCCM console and go to Monitoring>Distribution Status>Distribution Point Configuration Status.
Then click on the distribution point, then click on the Details tab and look for any error messages. Sort the list by clicking on the “Message” button to group the error messages.
Once all packages have been redistributed, return to the command prompt and restart scenario mode. Now the Content Library Cleanup tool should display the approximate size that will be released using the /delete parameter. A log file will list the packages that will be deleted.
Launching the contentlibrarycleanup tool in Delete mode
Now that the scenario mode has finished correctly, run the contentlibrarycleanup.exe /dp DPNAME /delete command to delete all the packages previously logged in. Once the operation is complete, the tool will display the size freed after the operation, which should correspond to what was displayed in scenario mode.
You now have the method to easily clean up your distribution points. Maybe you are just creating your SCCM architecture. If you don’t know how, find out how to create your distribution points.