SUSE Support

Here When You Need Us

Command Line Process for Cleaning Up Content Lifecycle Management Projects in SUMA/MLM

This document (000021924) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Manager 5
SUSE Manager 4.3


Situation

This is a process to cleanup SUSE Manager / SUSE Multi Linux Manager CLM projects via the command line. 

Resolution

These are the steps to remove a CLM project via CLI:

 

1. Get the Project Label for the CLM project you want to remove.  The project label can be set as a runtime variable or you can copy and paste into the examples below.

spacecmd -- api contentmanagement.listProjects

 

2. Removing filters - The jq utility is used here (one may have to install it).  One doesn't have to use jq and could simply get the ids from the full output if preferred.

 

Step 1. Get a list of filter ids for a project

spacecmd -- api contentmanagement.listProjectFilters -A "$projectLabel" 2>/dev/null|jq '.[].filter.id'

Step 2. Detach the filters from the CLM project, would need to run for each filter.

spacecmd -- api contentmanagement.detachFilter -A '[ "$projectLabel", $filterID ]'

Step 3. Delete filters by ID, need to run for each filter

spacecmd -- api contentmanagement.removeFilter -A $filterID

OR you can combine steps 2 & 3 with a loop. You must add the projectLabel and have jq installed.

projectLabel="$projectLabel";for i in $(spacecmd -- api contentmanagement.listProjectFilters -A "$projectLabel" 2>/dev/null|jq '.[].filter.id'); do spacemd -- api contentmanagement.detachFilter -A "[ \"$projectLabel\", $i ]";spacecmd -- api contentmanagement.removeFilter -A $i;done

 

3. Remove the CLM project (only removes the project not the software channels)

spacecmd -- api contentmanagement.removeProject -A "$projectLabel"

 

4. Remove the CLM software channels (doesn't free much space only removing the channels)

Step 1. Get a list of all software channels and use grep for the project name.  The base channel that has all the child channels is required, the base channel is the one that is not indented in the output. The grep might pull more than one set of channels, depending on the naming scheme.

spacewalk-remove-channel -l | grep $projectLabel

Step 2. Remove the base channel and all its child channels. Note if there are any subscribed systems the delete operation will not complete and you will be given a list of subscribed systems.  Replace $CLM_Base_Channel_name with what was found in the last step.

spacewalk-remove-channel -a $CLM_Base_Channel_name

 

Cause

The need to cleanup old, unused Content Lifecycle Management Projects (CLMs) and associated software channels in SUSE Manager / SUSE Multi Linux Manager.

Additional Information

CLM projects take up very little disk space on your SUMA/MLM server so do not expect to free up a lot of space when performing these actions. Basically, this cleanup is removing metadata.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021924
  • Creation Date: 21-Jul-2025
  • Modified Date:22-Jul-2025
    • SUSE Manager Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.