- +1 902 791 1110
- contact@bobbitt.ca
Yes, some distros still use rpm.
Extract files from an RPM:
rpm2cpio filename.rpm | cpio -idv
Unpack an RPM into /tmp/deleteme without installing it:
rpm -ivh -root /tmp/deleteme --nodeps --noscripts package.rpm
Install
rpm -ivh
Upgrade (use this except for kernels)
rpm -Uvh
Find out what's installed
rpm -qa
See which package a file belongs to
rpm -qf
List files provided by a package
rpm -ql
Show detailed info for a package
rpm -qi
Find all files from all packages that have been changed
rpm -Va
List packages by install date (useful for finding old packages)
rpm -qa --last
Clean up old remnants:
yum clean oldheaders
yum clean packages
Run apt-get on a list of systems in parallel
for HOST in $(cat hostlist.txt); do eval `ssh $HOST "sudo apt-get update" `; done
Search for packages containing "cyr"
apt-cache search cyr
Included below are some commands that I have found, created or tweaked to help make life easier along the way.
Getting SELinux working can be tough. Here are some commands I found useful.
Is SELinux enabled?
Deactivate all inactive users in the last year:
Yes, some distros still use rpm.
Extract files from an RPM:
Get into the correct directory:
cd /etc/pki/tls/certs