Equivalent in yum of apt-get update

10,471

Most yum commands will refresh the cache automatically if needed. It works differently than apt, which will not update its cache unless the update command is run

Share:
10,471
sffc
Author by

sffc

Updated on June 14, 2022

Comments

  • sffc
    sffc almost 2 years

    In Debian derivatives, before installing software from apt using apt-get install xxx, it is necessary to run apt-get update. This refreshes the package lists so that dependencies are resolved correctly, etc.

    When using an RHEL instance, out of habit, I ran yum update before installing software. However, this was only to find that yum update upgraded all of my packages instead of, or possibly in addition to, updating package lists locally as in apt-get update.

    Is it necessary to update yum's package lists before running yum install xxx? If so, how do you do it?

    • Mike Lentini
      Mike Lentini over 11 years
      Probably better suited for superuser.com