Starting with SCCM 1702, a new command line tool is available to remove content that is no longer associated with any package or application from a distribution point. The SCCM Content library cleanup tool (ContentLibraryCleanup.exe) can help you save up valuable space in a specific distribution point content library.
The tool will delete content from the library based on the specified distribution point when the tool is run.
SCCM Content Library Cleanup Tool Requirements
- You can run the content library cleanup tool directly on the computer that hosts the distribution point or remotely from another server
- You can run the tool from a single distribution point at a time
- You will need to have Full Administrator RBAC Role and the “All” Security scope in the Configuration Manager hierarchy
Running the Tool
You can find ContentLibraryCleanup.exe in the SCCMInstallationDir\cd.latest\SMSSETUP\TOOLS\ContentLibraryCleanup\ folder on the primary site or central administration site.
You can run the tool in 2 modes: What-If mode and Delete mode.
We will start by not specifying the /delete switch. The tool will run in What-If mode. This mode allows identifying the content that would be deleted from the distribution point.
- On your Primary site, open an administrative command prompt and go to the ContentLibraryCleanup folder (see full path above)
- Command : ContentLibraryCleanup /dp SCCM2012
- The tool will check the content library on the SCCM2012 machine which is my distribution point (in What-If mode)
- We encounter the following error:
System.InvalidOperationException: This content library cannot be cleaned up right now because package 10000004 is not fully installed.
at Microsoft.ConfigurationManager.ContentLibraryCleanup.CLContentLibrary.LoadDistributedPackagesFromProvider()
at Microsoft.ConfigurationManager.ContentLibraryCleanup.CLContentLibrary.LoadValidContentData()
at Microsoft.ConfigurationManager.ContentLibraryCleanup.CLContentLibrary..ctor(String remoteDPFqdn, String primarySiteServerFqdn, String primarySiteCode)
at Microsoft.ConfigurationManager.ContentLibraryCleanup.Program.Main(String[] args)
This error happens because the package ID 10000004 has content replication issues.
- If you have this error, open the SCCM console and fix the replication issue on the specified package ID and rerun the tool
- The tool runs and the log file is written to the temp folder of the user account that runs the tool. The log file will open automatically
- Review the log file to see what could be deleted if the /delete switch is ran
- When you’re fine with it, run the following command to delete the content:
- ContentLibraryCleanup /DP SCCM2012 /Delete
- Before deleting each file, you must confirm that the file should be deleted (Yes, No, All)
All command line switches for the SCCM Content library cleanup tool can be found on the Technet Documentation.
Barun
01.31.2020 AT 02:38 PMAmrita
04.06.2020 AT 08:49 PMKcorrie
02.20.2020 AT 09:14 AMAndrews
08.28.2019 AT 08:47 AMMrinmoy Saha
07.22.2019 AT 11:14 AMXimena Ausejo
07.15.2019 AT 03:45 PMJordan Cobb
05.20.2019 AT 09:51 AMMatthew Brahm
04.21.2020 AT 02:46 PMJbobaroonie
10.25.2018 AT 03:09 PMArtiriun
07.12.2019 AT 03:25 AMMartin
03.11.2020 AT 02:15 AMGwyn Jones
06.05.2018 AT 11:25 AMDerek Greczyn
05.31.2018 AT 08:59 AMtva
06.21.2018 AT 05:09 AMAdam
12.27.2017 AT 04:37 PMalan
10.13.2017 AT 01:03 PMtony
05.11.2017 AT 06:13 PMTushar
04.27.2017 AT 12:54 PMAaron Whittaker
05.11.2017 AT 01:24 AM