Linux – Yum: List & Remove all devel packages

fedoralinuxpackage-managementrhel6yum

Devel packages usually contain the headers or other stuff that's necessary for compiling applications.

To keep the systems clean and manageable, I'm looking for a command to
list all-devel-packages installed by yum (also rpm's, without the suffix).

I usually use yum list installed and collect the devel's manually.

Do you recommend to remove them after compilation as a general rule?

Best Answer

I think your question on development packages removal has a two part answer. The first part is to remove the -devel packages as recommended by others. This will remove the development interfaces for applications such as httpd-devel.

The second part is core development packages for basic development, mostly needed if you need to install program from source code. RHEL groups this packages under Development tools. You can remove these packages using -

        yum groupremove "Development tools"

Personally I wouldn't install any development packages on production servers as SvenW mentioned. So I would start with a clean base installation without any development packages and then explicitly install only the absolutely needed ones later depending on your requirements.