Skip to content
View Categories

Yum Cheatsheet

1 min read

YUM DEALS WITH REPOS, RPM DEALS WITH INSTALLED PACKAGES

yum provides /etc/passwd
## which package provides a file including uninstalled package
Loaded plugins: fastestmirror, langpacks, protectbase, rhnplugin, universal-hooks, versionlock
This system is receiving updates from CLN.
Loading mirror speeds from cached hostfile
* cpanel-addons-production-feed: 91.197.228.252
* cpanel-plugins: 91.197.228.252
* cloudlinux-x86_64-server-7: cl-mirror.fr.planethoster.net
* epel: mirrors.coreix.net
287 packages excluded due to repository protections
setup-2.8.71-5.el7.noarch : A set of system configuration and setup files
Repo : cloudlinux-x86_64-server-7
Matched from:
Filename : /etc/passwd

rpm -qa setup
## query all packages installed
setup-2.8.71-10.el7.noarch

rpm -qa | grep "alt-php" | grep "opcache"
## query all grepping out usefull installed packages
alt-php73-opcache-7.3.12-1.el7.x86_64
alt-php72-opcache-7.2.25-1.el7.x86_64
alt-php70-opcache-7.0.33-32.el7.x86_64
alt-php71-opcache-7.1.33-1.el7.x86_64

rpm -ql setup
##what files included in package (query list)
/etc/aliases
/etc/bashrc
/etc/csh.cshrc

/usr/share/doc/setup-2.8.71/uidgid
/var/log/lastlog

rpm -qa --changelog setup | head
##show changlog for package
* Thu Jun 21 2018 Ondrej Vasik <[email protected]> – 2.8.71-10
– fix crudp name in /etc/protocols (#1566469)
– do not list /sbin/nologin and /usr/sbin/nologin in /etc/shells
(#1571104)* Wed Nov 22 2017 Ondrej Vasik <[email protected]> – 2.8.71-9
– change the URL of the upstream (#1502427)* Fri Nov 17 2017 Ondrej Vasik <[email protected]> – 2.8.71-8
– fix group id for tape in /etc/group (should be 33) (#1433020)

rpm -V setup
##verify files against install default (-VA does all packages)
S.5….T. c /etc/bashrc
.M……. c /etc/gshadow
S.5….T. c /etc/profile
.M……. c /etc/shadow

rpm -qf /etc/passwd
##which installed package provides file – this differs from YUM because it only looks at installed packages
setup-2.8.71-10.el7.noarch