rpm files even if they're not in the system. More intelligent management system that can find dependencies andĭownload. Packages it is asked to manipulate, and there is "yum", which is a There is the program, "rpm", which manipulates specifically the I would go with rpm -qa list.Īlso, from this answer, I see the below piece of information. pam_krb5-2.2.14-22.el5īoth the commands give me the same number of lines as output. Yum list installed gives me the output as below. This shows that rpm -qa also includes package listings for the public keys that are trusted to sign packages while the yum command omits these packages. Here’s the results from the CentOS 6 box: # diff installed. Now, we can use the diff command to compare the output of the two files. yum list installed | sed '1,2d /^ /d s/\.*//' >| installed.yum We can also use sed to remove all the lines that are continuations of a package listing (these lines begin with a number of spaces so that all the package versions line up). We can use sed for this: yum list installed | sed '1,2d ' Remove the first two header lines ( Loaded plugins and Installed Packages): Loaded plugins: etckeeper, fastestmirror Use a sed command to remove the package version numbers: rpm -qa | LC_ALL=C sort r | sed 's/-*-*$//' >| installed.rpm Sort it so that packages beginning with an upper case letter appear before those with lower case: rpm -qa | LC_ALL=C sort The following output (from a CentOS 6 box) shows that two lines are used to list the device-mapper-persistent-data.x86_64 package: device-mapper-libs.x86_64 1.02.95-3.el6_7.4 12:4.1.1-49.P1.v6 this is not the only reason and it can be seen by massaging the output of the two commands before comparing them: It does this by using two lines for listing such packages and padding the second line with space characters to line up the fields correctly. The primary reason for the differing number of lines is that the output produced by yum is formatted so that each field lines up vertically (regardless of the length of the package name and/or version number).
0 Comments
Leave a Reply. |