Best practice to remove rpms from /var/lib/pulp/content/units/rpm/** on Satellite 6

Latest response

/var/lib/pulp/ is getting bigger and bigger. How can we safely remove the rpms from /var/lib/pulp/content/units/rpm/dd/003bbff*** to free up some space. For example;

/var/lib/pulp/content/units/rpm/dd/003bbf4645cfbd2eda937b7ba5675a881634f349943e14247dc71f8ca78d1b/rh-nodejs8-nodejs-preserve-0.2.0-5.el7.noarch.rpm

Responses

First, we dont recommend directly changing content of /var/lib/pulp until you are sure what you do, or until suggested by Red Hat.

There is a cronjob /etc/cron.weekly/pulp-maintenance that triggers pulp.server.managers.content.orphan.delete_all_orphans pulp task. This task identifies all orphaned content - packages, OSTree branches, errata etc. - that are not associated to any repository, and it deletes all that units. If some, say, package, remains after that cleanup, it must be contained in some repository.

To identify what repository contains a given package, check in WebUI: Content -> Packages -> search filename = rh-nodejs8-nodejs-preserve-0.2.0-5.el7.noarch.rpm. Click to the found result and go to Repositories tab.

If you want to get rid of a given package, disable all its associated repositories first (you would need to remove those repos from Content Views before that). Then the weekly cronjob will remove the package as well.