Version 1 (modified by james, 7 years ago)

Some yum usage for people who know "apt"

If you are familiar with the apt package manager on Debian/Ubuntu this page should help you transfer your knowledge to working with yum on Fedora/RHEL/CentOS/etc.

Note that this page as currently written is by non-apt experts, so there may be some mistakes.

General points

  • Speed: apt on Debian deals with roughly ~37,000 packages[1] and an extra 6,500 "provides"[2]. yum on Fedora deals with roughly 24,000 packages, 143,000 provides and 3,100,000 file provides.
  • Caching: apt uses manual caching and yum uses automatic caching. You can convert to manual caching by setting metadata_expire=never and manually running "yum makecache", this is rarely a good idea.
  • Packaging: apt is packaged in the "apt-get" package, and extended through a number of "apt-*" packages (like apt-file). yum is packages as "yum" and extended via. "yum-utils" and a number of plugins "yum-plugin-*" and "yum-*-plugin" and also a number of packages that use the yum API (like mock or rhn-check).

Simple conversion

For some of the basic packaging operations, apt and yum are basically identical.

  • apt-get install
    • yum install
  • apt-get upgrade
    • yum upgrade
  • apt-get remove
    • yum remove
  • apt-get --reinstall install
    • yum reinstall
  • apt-get install foo=1.0 (to downgrade to version 1.0)
    • yum downgrade foo-1.0
  • apt-get clean
    • yum clean
  • apt-get build-dep
    • yum-builddep

Not so simple conversions

These are "similar", but there are some differences in how they act.

  • apt-cache show
    • yum info
    • repoquery -i
  • apt-get purge
    • yum remove
  • apt-get dist-upgrade
    • yum upgrade
    • yum distro-sync
  • apt-get source
    • yumdownloader --source

[1] apt-cache dump | egrep "Package" | wc -l [2] apt-cache show ".*" | fgrep "Provides" | tr , '\n' | wc -l