Last active
July 14, 2021 20:38
-
-
Save leveled/b327b41a1a8c7f734c16806926091bbf to your computer and use it in GitHub Desktop.
RPM/yum/dnf Cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Extract files from an RPM | |
rpm2cpio ./packagecloud-test-1.1-1.x86_64.rpm | cpio -idmv | |
#List files in an RPM | |
rpm -qlpv ./packagecloud-test-1.1-1.x86_64.rpm | |
#List files in an installed RPM | |
rpm -ql packagecloud-test | |
#Show RPM preinstall and postinstall scripts | |
rpm -qp --scripts ./packagecloud-test-1.1-1.x86_64.rpm | |
#View contents of a repo on a remote repository | |
repoquery --list <packagename> | |
#Downloading matching files from a remote repo via DNF | |
sudo dnf install --downloadonly --downloaddir=. 'package-prefix*' | |
#Print list of files in RPM package with name as a separator | |
rpm --queryformat "%{NAME} %{SIZE}\n" -qlpv '../../../fb-ncipher*' | less |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment