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?
1 Answer
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 asupgrade
) 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.
-
So, if I am not currently aware of any software upgrades then simply run
apt-get dist-upgrade
whenever an update is needed? Feb 2, 2015 at 22:23 -
@BrassApparatus No you need to run apt.get update first or there will be nothing new to install.– AlvarFeb 2, 2015 at 22:24
-
@Alvar: need to mention that
upgrade
will not install/remove any new file.– heemaylFeb 2, 2015 at 22:34 -
-