RPM Package Management: Difference between revisions
Jump to navigation
Jump to search
(→yum) |
(→yum) |
||
Line 23: | Line 23: | ||
* which repo provides this package? | * which repo provides this package? | ||
<pre> | <pre> | ||
$ yum list | fgrep PACKAGE | $ yum list available | fgrep PACKAGE | ||
</pre> | </pre> | ||
Line 29: | Line 29: | ||
<pre> | <pre> | ||
$ yum list installed | fgrep PACKAGE | $ yum list installed | fgrep PACKAGE | ||
</pre> | |||
* … | |||
<pre> | |||
$ yum remove PACKAGE | |||
</pre> | |||
* not only remove …, but also remove dependencies! | |||
<pre> | |||
$ yum autoremove PACKAGE | |||
</pre> | </pre> | ||
Revision as of 13:01, 24 August 2021
DNF
DNF is a rewrite of yum, DNF replaced YUM as the default package manager in Fedora 22.
yum
- https://en.wikipedia.org/wiki/yum_(software)
- https://www.redhat.com/sysadmin/how-manage-packages
- https://access.redhat.com/articles/yum-cheat-sheet
- https://access.redhat.com/node/1284753/40/0/5827093 – yum command cheat sheet
- https://access.redhat.com/sites/default/files/attachments/rh_yum_cheatsheet_1214_jcs_print-1.pdf
- https://www.man7.org/linux/man-pages/man8/yum.8.html
YUM allows for automatic updates and package and dependency management on RPM-based distributions. YUM works with software repositories (collections of packages), which can be accessed locally or over a network connection.
- which package provides this file?
$ yum provides /path/to/your/file
- which repo provides this package?
$ yum list available | fgrep PACKAGE
- which repo is this this package installed from?
$ yum list installed | fgrep PACKAGE
- …
$ yum remove PACKAGE
- not only remove …, but also remove dependencies!
$ yum autoremove PACKAGE
yum-utils
$ yum install yum-utils
repoquery
--plugins: enable YUM plugin support.
- list the contents of PACKAGE -- PACKAGE is possibly not (yet) installed, i.e. only lives in the repo:
$ repoquery --query --list --plugins PACKAGE
rpm
- which package provides FILE?
$ rpm --query --file FILE
- list the contents of PACKAGE:
$ rpm --query PACKAGE $ rpm --query --queryformat "[%{=NAME}-%{=VERSION}-%{=RELEASE}:\t%-50{FILENAMES} %10{FILESIZES}\n]" PACKAGE