[Spacewalk-list] Unused packages

Michael Mraka michael.mraka at redhat.com
Tue Feb 6 08:18:41 UTC 2018


Matthew Madey:
> I'm looking to do some cleanup of packages in Spacewalk, but not yet sure
> how to approach the problem. I'd like to identify packages managed by
> Spacewalk in specific channels that are not installed on any servers. We
> have many developers pushing content to Spacewalk 24/7. Over time, we end
> up with tens of thousands of packages that are no longer needed in any
> lifecycle. I know there are some API's to determine what servers have a
> specific package installed, but I'm looking for the opposite.. identify
> packages that are not installed on any Spacewalk managed server.. I think
> that will give me a better idea of what can be purged.


Hi Matthew,

You can list packages used by all server running
`spacewalk-report system-packages-installed`. Similarly you can list all
packages in channels using `spacewalk-report channel-packages`.
Combining the two lists you can find out unused development packages.
And the remove them via api.

> I'm also looking for a good way to manage this in the future.. for
> instance, allowing "n" number of versions of a specific package, and
> programmatically removing the oldest versions that exceed "n" number.. has
> anyone attempted this or have advice on how I could go about doing it?

Regards,

--
Michael Mráka
System Management Engineering, Red Hat




More information about the Spacewalk-list mailing list