Results 1 to 6 of 6

Thread: Update vs Upgrade

  1. #1
    Join Date
    May 2007
    Beans
    125

    Update vs Upgrade

    Using the terminal, what is the difference between these two commands?

    sudo apt-get update
    sudo apt-get upgrade

  2. #2
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: Update vs Upgrade

    From man apt-get:
    update
    update is used to resynchronize the package index files from their
    sources. The indexes of available packages are fetched from the
    location(s) specified in /etc/apt/sources.list. For example, when
    using a Debian archive, this command retrieves and scans the
    Packages.gz files, so that information about new and updated
    packages is available. An update should always be performed before
    an upgrade or dist-upgrade. Please be aware that the overall
    progress meter will be incorrect as the size of the package files
    cannot be known in advance.

    upgrade
    upgrade is used to install the newest versions of all packages
    currently installed on the system from the sources enumerated in
    /etc/apt/sources.list. Packages currently installed with new
    versions available are retrieved and upgraded; under no
    circumstances are currently installed packages removed, or packages
    not already installed retrieved and installed. New versions of
    currently installed packages that cannot be upgraded without
    changing the install status of another package will be left at
    their current version. An update must be performed first so that
    apt-get knows that new versions of packages are available.
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  3. #3
    Join Date
    Jul 2006
    Beans
    288
    Distro
    Kubuntu

    Re: Update vs Upgrade

    Put another way, update does not make any changes to the set of installed packages, it merely checks to see what's new. Whereas upgrade does.

  4. #4
    Join Date
    May 2007
    Beans
    125

    Re: Update vs Upgrade

    This answers my question. I appreciate the education from the both of you.

  5. #5
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Update vs Upgrade

    dist-upgrade is what you want to avoid.

    It moves you from say Hardy to Intrepid. You can expect breakage when that happens.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  6. #6
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    8,430
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Update vs Upgrade

    Quote Originally Posted by tgalati4 View Post
    dist-upgrade is what you want to avoid.

    It moves you from say Hardy to Intrepid. You can expect breakage when that happens.
    No you don't. dist-upgrades are fine. That's why they are there.
    None but ourselves can free our minds

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •