How To Fedora: Everything you wanted to know about YUM and did not dare to ask (Part I)

YUM (Yellow dog Updater, Modified): It is a command line software manager (CLI) to update, install, and uninstall packages with automatic dependency resolution. It is written in Python, which allows its functionalities to be expanded through plugins. Yum is also available on Debian.

Yum offers secure package management as it supports signature verification system GPG (GNU Privacy Guard, also known as GnuPG). When signature verification is enabled, Yum will refuse to install any packages that are not signed with the correct GPG key for that repository. This means that you can trust that packages RPM that you download and install on your system are from a reliable source and were not modified during the transfer.

In this how To (divided into several parts) we will see how to make the most of this powerful and flexible software manager that, in my personal opinion, is one of the best that exists in addition to pacman (Archlinux);). We will see practically all the options it has, the plugins and how to configure it according to our own needs: D.

To use any of the options shown below it is only necessary to access as root or use sudo and write:

yum [opciones] comando {paquete1} {paquete2} {...}

Example:

yum -y install clementine

Note: The parameters contained between [] are optional, the parameters contained between {} will depend on the command to be used.

The list of commands yum has is:

  • install package1 [package2] […]
  • update [package1] [package2] […]
  • update-to [package1] [package2] […]
  • check − update
  • upgrade [package1] [package2] […]
  • upgrade-to [package1] [package2] […]
  • distribution-synchronization [package1] [package2] […]
  • remove | erase package1 [package2] […]
  • list […]
  • info […]
  • provides | what provides feature1 [feature2] […]
  • clean [packages | metadata | expire-cache | rpmdb | plugins | all]
  • make cache
  • groups […]
  • search string1 [string2] […]
  • shell[filename]
  • resolvedep dep1 [dep2] […]
  • (maintained for legacy reasons only - use repoquery or yum provides)
  • localinstall rpmfile1 [rpmfile2] […]
  • (maintained for legacy reasons only - use install)
  • localupdate rpmfile1 [rpmfile2] […]
  • (maintained for legacy reasons only - use update)
  • reinstall package1 [package2] […]
  • downgrade package1 [package2] […]
  • deplist package1 [package2] […]
  • repolist [all | enabled | disabled]
  • version [all | installed | available | group- | nogroups | grouplist | groupinfo]
  • history [info | list | packages-list | packages-info | summary | addon-info | redo | undo | rollback | new | sync | stats]
  • load-transaction [txfile]
  • check
  • help [command]

Description of the commands

install

It is used to install the latest version of a package or group of packages while ensuring that all dependencies have been satisfied. If no package matches the given package name, then the matches are installed. If the name begins with an "@" character, the rest of the name is used as if the groupinstall command was executed. If the name begins with a "-" character then a search is done within the transaction and any matches are removed. If the name is a file, then the installation is done as if it were done through localinstall.

Update

If run without using a package name, update updates all packages currently installed on the system. If one or more packages are specified, yum will only update the designated packages. Yum will make sure that all dependencies have been satisfied during the update.

update-to

This command works like "update", but you always specify the version of the package to which you want to update.

check − update

It has been implemented so that you can know if your machine has pending updates without having to run update interactively. It also returns a list of packages to be updated in list format. When run in verbose mode (verbose) it also shows obsolete packages.

upgrade

It is the same as the update command with the flag --obsoletes.

distribution − synchronization o distro − sync

Synchronize the installed package together with the latest available packages, this is done either due to obsolescence, update or outdated, as appropriate. If you give the optional argument "full", the command will also reinstall packages where the installation checksum and the available checksum do not match. And remove old packages (can be used to sync rpmdb versions). The optional argument "different" can be used to specify the default operation. This command will not perform operations on groups, local packages, or negative selections.

remove o Erase

They are used for removing specified packages from the system, as well as removing packages that depend on the package being removed.

Note: you can't accidentally remove yum by yourself.

list

It is used to display various information about the available packages. The full set of options for this command is detailed below:

  • yum list [all | pattern1] [pattern2] […]

Shows all available and installed packages.

  • yum list available [pattern1] […]

Show all packages in yum repositories available to be installed.

  • yum list updates [pattern1] […]

It shows all the packages with updates available in the yum repositories.

  • yum list installed [pattern1] […]

List the packages considered as arguments. If an argument does not match the name of an available package, the matches are printed.

  • yum list extras [pattern1] […]

It lists the packages installed on the system that are not available in any yum repository and that appear in the configuration file.

  • yum list obsolete [pattern1] […]

It lists the packages installed on the system that have become obsolete in any yum repository and that appear in the configuration file.

  • yum list recent [pattern1] […]

List the packages recently added to the repositories. This is not usually useful, but if you really want it you can use is the plugin yum list-updateinfo as follows: "yum list-updateinfo new".

Note: you can substitute the parameter «pattern1","pattern2', Etc., with the name of the package you want to check. Remember that the options marked between [] are optional.

At the moment the first part is here so as not to extend too much;).

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   rogertux said

    Suicide-friendly
    Note: you cannot accidentally remove yum by yourself.

  2.   azavenom said

    very good info, some questions XD that can also be installed in ubuntu? and if you can use the debian repo in ubuntu?

    1.    perseus said

      You could use yum as a package manager as an alternative to apt-get or aptitude, I am not sure if you could use the debian package in Ubuntu and it works correctly, it would be a matter of testing :).

  3.   rock and roll said

    You have created an existential doubt for me ... Yum on Debian! (and yes, it is; I corroborated it by checking the repositories). Does this mean that .rpm packages can be installed on debian (do I have to add repositories as well?) Or that I can take advantage of yum's commands and GUI to install .deb packages? Sorry if I'm saying atrocious, but what I read surprises me.
    Greetings.

    1.    pandev92 said

      It would be assumed that you can install the .deb packages with yum, just like in pclinux os the rpm packages with synaptic and apt xD

    2.    proper said

      Looking at it from the logical point of view, the normal thing would be that with yum you can install .deb packages, so instead of writing "apt-get install firefox" you write "yum install firefox"

      1.    Juan Carlos said

        And that's the way it should be, since the installer is one thing and the package is another.

  4.   JULY said

    The truth is that I realize that we all use an operating system but none of us have the slightest idea of ​​how it works.

    http://www.mylifeUnix.org

    1.    perseus said

      You are very right friend, many of us think we know a lot about our distro, but when we investigate a little it turns out that what we know is tiny XD.

  5.   Juan Carlos said

    And speaking of yum, did you realize that the Fedora folks already directly advise installing on 64-bit systems?

    1.    proper said

      I had no idea, anyway the advantages of 64-bit systems are many 🙂

    2.    perseus said

      How about bro, as you well point out, it is highly recommended to use the 64-bit version, from what I have read, Fedora x86_64 uses the packages for 64 as much as possible and only if they do not exist, it combines them with those of 32. This it's really cool since we always complain about poor compatibility between 32 and 64 bit systems.

      Cheers :).

  6.   Charles Emilio said

    The YUM in Debian does not surprise me, since Fedora core used apt-get as a manager, I even created version 7 or something like that, since I like to combine package managers I look a lot about them, and recently I screwed up my fedora 17 for putting Pacman (yes, the ArchLinux manager) and everything worked until I restarted XD

    1.    perseus said

      Wow, pacman in Fedora *. *, Too bad it didn't work for you :(. What you say about changing package managers between distros is something that many of us don't know about, that's why I had a good idea to point out the data :).

      Thanks for the comment and for the visit, greetings bro;).

  7.   Emiliano said

    I have been using Fedora x86_64 for about two years.
    I have not had any problem.
    It works much better than the 32-bit version.
    Yum is one of the best programs to install.
    I have long since stopped using the "rpm" command to
    perform the installation of downloaded packages and that
    they are not in repositories. If you combine it with «Yumex»,
    the graphical interface, they are very powerful tools.
    In this latest version of Fedora, "apper" works very well,
    at least as far as I've tried, installing packages
    done from Firefox, because one of the actions is to install it with
    appar.

    Greetings,

    Emiliano
    Badajoz

    1.    pipi said

      D: