Preferred method to manage packages in Fedora is yum
. rpmreaper
is an useful tool to analyse package dependencies.
$ rpm -qf 〈file〉
query package owning file (file has to be with a full path).
$ rpm -qp --changelog http://server/package.rpm
show change log of the package.
$ rpm -ql 〈package〉
list content of the package .
$ rpm -q --whatrequires 〈package〉
show packages that require this package.
$ rpm -qa -last | tac
list all installed packages sorted by time (install time).
$ rpm -qa --queryformat '%10{size} %{name}-%{version}\n' | sort -n
list all installed packages sorted by size.
$ rpm -qa | grep 〈pattern〉
list packages filtered according to the pattern.
# rpm -Uvh 〈package〉
-U
install package, remove older one if such exists; -v
verbose; -h
show hashing marks during installation (or --percent
). --oldpackage
install older package.
# rpm -e 〈package〉
remove package
# rpm -U --test 〈package〉
test package installation, do not install. Nothing will be printed if the test was passed without any problems.
$ rpmls 〈path-to-rpm〉
list content of rpm. rpmdevtools
has to be installed.
$ rpm2cpio 〈path-to-rpm〉 | cpio -iumdv
or, if you have installed rpmdevtools
$ rpmdev-extract 〈path-to-rpm〉
extract all files from rpm into current directory.
Edward C. Bailey, Taking the Red Hat Package Manager to the Limit