1

It seems that every time I install software an apt-get update is helpful but when exactly is an apt-get upgrade necessary? Or perhaps, when is it helpful?

5

Note that for upgrade or dist-upgrade you must first run an update to get the list of packages to determine what actually needs updated.


This is a breakdown of the apt-get commands:

  • update - Only updates the software list.

  • upgrade - Only upgrades to newer versions of the same files.

  • dist-upgrade - upgrades to newer software versions (same as upgrade) and installs new software.

So to make get a completely upgraded system allyou have to do is:

apt-get update && apt-get dist-upgrade 

The most common new files are new kernel versions, since new ones are installed instead of the old one just getting replaced, so that you can run an older one if it breaks the install in some way.

5
  • So, if I am not currently aware of any software upgrades then simply run apt-get dist-upgrade whenever an update is needed? – BrassApparatus Feb 2 '15 at 22:23
  • @BrassApparatus No you need to run apt.get update first or there will be nothing new to install. – Alvar Feb 2 '15 at 22:24
  • @Alvar: need to mention that upgrade will not install/remove any new file. – heemayl Feb 2 '15 at 22:34
  • @Alvar: yeah, neat :) – heemayl Feb 2 '15 at 22:46
  • @Alvar no problem, just wanted to improve the formatting. – Thomas Ward Feb 2 '15 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.