top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

list installed package on CentOS, without formatting overhead

+1 vote
348 views

In order to make the same installation on two servers where all was installed via yum/rpm, I want to dump a list of all installed packages on the first server.

My problem is if I just "yum list installed", some weird formatting prints packages information on 2 lines...
I have to

 # yum list installed | awk '{print $1}' 
 | grep -v '@' | grep -vE '^[0-9]'

Is there a cleaner way?

 # rpm -aq

Is not OK because it includes version in a way it's more hard to parse just the package name.

posted Aug 29, 2013 by Luv Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

rpm -qa --qf "%{NAME}n"
rpm -qa --qf "%{NAME}.%{ARCH}n"

answer Aug 29, 2013 by Sheetal Chauhan
Similar Questions
+1 vote

During yum upgrade a couple days ago, I saw this:

Cleanup : kernel-3.10.0-229.20.1.el7.x86_64  35/64
warning: file /lib/modules/3.10.0-229.20.1.el7.x86_64/modules.softdep: 
remove failed: No such file or directory
warning: file /lib/modules/3.10.0-229.20.1.el7.x86_64/modules.devname: 
remove failed: No such file or directory

Should I be concerned about this? What could have caused it?

0 votes

I have a machine that recently had some file system corruption. fsck was able repair the file system but I am getting the following error when I try to do yum update:

[Errno 21] Is a directory: '/var/lib/yum/yumdb/e/2f883c08e3b596b66fcc19c6b4d73b11c9aaa43e-e2fsprogs-1.41.12-14.el6_4.2-x86_64/checksum_type'

In searching Google, some suggested renaming the yumdb but that just results in a traceback when I run yum.

There are some files in lost+found but I am not sure what the above file should look like and inode numbers are not useful to me.

Anyone have an idea how to fix this without reloading the machine?

+1 vote

Is there an 'after the fact' way to find what yum groups are installed, including ones that were added with 'yum groupinstall' instead of the initial anaconda install?

+2 votes

I am having problems with a CentOS 6.4 box that I was in the process of doing a yum update to 6.5. Unfortunately the system hung during the update and I was forced to reboot it and it is now a bit of a mess.

Can someone point me in the direction of any documentation that would assist in the recovering from this.

+2 votes

If I add priority=1 to [updates] in CentOS-Base.repo
when I run "sudo yum update" I get the warning 66 packages excluded due to repository priority protections

This does not seem to have any adverse effect, but what exactly does it mean?

...