[CentOS] Minimising a CentOS installation

Sat Aug 21 18:24:06 UTC 2021
Leon Fauster <leonfauster at googlemail.com>

On 21.08.21 19:02, Steven Rosenberg wrote:
> On Fri, 2021-08-20 at 22:10 -0600, James Szinger wrote:
> 
>> My typical approach is to run `package-cleanup --leaves --all` or
>> `yum
>> leaves` (might need software not on CentOS 8) and justify everything
>> that is there.  I have about 85 leaf packages on a CentOS 7 web
>> server, so a minimal package set should be smaller.  Experiment with
>> a
>> disposable VM so it is easy to recover from mistakes.
> 
> Thanks for this. I did a little searching and found this page:
> 
> 
> https://linuxconfig.org/how-to-remove-orphaned-packages-on-centos-linux
> 
> It worked for me:
> 
> Get a list of orphaned packages:
> 
> $ package-cleanup --leaves
> 
> Remove them:
> 
> # yum remove `package-cleanup --leaves`
> 
> That's only if you're OK removing all of them.
> 


Not sure why but at least on two C8S systems (not all)
the kernel rpms are listed as leaves, also the running one.
So, better don't execute the above command ...

Investigating why other C8S systems do not show the kernel
rpms ...

--
Leon