yum

Old packages

Fedora developers update packages frequently. Usually, the new packages are working properly and there is no need to look back, but in rare occasions a new package can misbehave and you would like to roll back to the previous version. Where the older package can be found?

All officially built packages can be downloaded from Fedora Buildsystem (koji). If you like to keep the installed packages yourself, you have to change /etc/yum.conf and set keepcache=1. By default, yum does not keep packages in cache that is located in /var/cache/yum/.

Repositories

$ yum repolist all

# yum --disablerepo=⟨repo-name⟩

Temporary Activate Repository

$ yum --enablerepo=updates-testing list updates

# yum --enablerepo=updates-testing update ⟨package⟩

Temporary Exclude Certain Packages from Update

# yum --exclude=⟨package⟩ update

Download Package

# yum update ⟨package⟩ --downloadonly --downloaddir=⟨dir⟩
$ yumdownloader --source ⟨package⟩

Install Local Package

# yum localinstall ⟨path-to-package⟩

Searching for Packages

Search by Package Name

$ yum list ⟨package-name⟩\*

Searching Packages by Keyword in Description

$ yum search ⟨keyword⟩

Find Package that Provides File

$ yum provides "*/⟨file-name⟩"
or
$ repoquery --nvr --whatprovides ⟨file-name⟩

Orphans

$ yum list extras   or   $ package-cleanup --orphans
list packages installed on the system that are not available in any known repository.

List Installed Packages from Certain Repository

yum list installed | grep ⟨repo-name⟩

Security Plugin

yum-plugin-security adds the options --security, --cve, --bz and --advisory flags to yum and the list-security and info-security commands. The options make it possible to limit list/upgrade of packages to specific security relevant ones.

$ yum list-security | sort   or   $ yum list-security bugzillas | sort

$ yum info-security FEDORA-2013-xxxx

# yum update --advisory FEDORA-2013-xxxx

Changelog

$ yum-plugin-changelog allows to look in package changelogs.

$ yum changelog ⟨number⟩   show chosen number of package changes.

History

The history of changes made by yum is stored in /var/log/yum.log.

# yum history list all

# yum history info ⟨id-number⟩

# yum history undo ⟨id-number⟩
# yum history redo ⟨id-number⟩

Disable Certain Packages

To disable certain packages from being installed it is needed to add exclude list into /etc/yum.conf or to .repo (repository configuration) in /etc/yum.repos.d/

The syntax is as follows:
exclude=package1 packages2* packages3?

Package Groups

$ yum -v grouplist

$ yum groupinfo development-tools

# yum groupremove "Tibetan Support"   or   # yum remove @tibetan-support

Old Kernels

The old kernels can by removed by package-cleanup from yum-utils package

package-cleanup --oldkernels --count=2

To make amount of installed kernels permanent, set installonly_limit=2 in /etc/yum.conf.