Few useful yum commands
To find difference in packages between installs -
rpm -qa --qf '%{NAME}.%{ARCH}\n' | sort > new-installed-rpms.txt
- yum list installed - Gives a list of already installed packages
- yum history list - Gives a list yum installs. Note that one can install multiple packages and their dependencies in a single invocation. Example, yum install docker-ce, docker-ce-cli
- yum history info
- Gives the details of yum invocation for each of the historical entry above. - /var/log/yum.log - also contains log of yum installs
- yum list docker-ce --showduplicates | sort -r - Shows all the versions that are present for docker and sorts them.
To find difference in packages between installs -
- Before installation -
rpm -qa --qf '%{NAME}.%{ARCH}\n' | sort > old-installed-rpms.txt
- After installation -
rpm -qa --qf '%{NAME}.%{ARCH}\n' | sort > new-installed-rpms.txt
- Diff -
diff old-installed-rpms.txt new-installed-rpms.txt | grep '^<'
No comments:
Post a Comment