what is the difference between update and upgrade?

12,780

Solution 1

From man apt

  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...

...

  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

In simple words: apt-get update will update apt's database, the list of available packages (and version's date and number). Where apt-get dist-upgrade will upgrade all packages installed in your system (... if date and/or version differ).

Solution 2

update updates the list of available packages and their versions, but it does not install or upgrade any new packages.

upgrade actually installs newer versions of the packages you have.

Share:
12,780
xiaohunian
Author by

xiaohunian

Updated on June 04, 2022

Comments

  • xiaohunian
    xiaohunian almost 2 years

    In apt-get command, what is the major effects of update and upgrade? I didn't see any difference besides the wording. It seems like update is about system package whereas upgrade is about software package. If that is the case, how to tell which is system package and which is software package?

  • xiaohunian
    xiaohunian about 9 years
    thanks it is very helpful
  • YATIN GUPTA
    YATIN GUPTA about 6 years
    Hi Quentin, I think you have not read my answer properly. I suggest you to read my answer once again, May be you get things that are absolutely true.
  • Quentin
    Quentin about 6 years
    I did read the answer. It gave me the distinct impression that you did not understand the question. In particular the bit where it said In apt-get command