I want to know about different update and upgrade commands as follows:
update
upgrade
dist-upgrade
do-release-upgrade
etc.
For new users of Ubuntu and using the command-line, which of these is used and when? In brief, help me to understand the use of the above commands.
Best Answer
APT (Advanced Packaging Tool) is a management system for software packages. Usually used as root/sudo user. The usual command is
apt-get
, but with Ubuntu 14.04, there's also theapt
tool: What is the difference between apt and apt-get?1.
sudo apt-get update
:After changing
/etc/apt/sources.list
or/etc/apt/preferences
or adding/removing repositories, you have to run this command to makeapt
aware of your changes.Run this command periodically to make sure your source list is up-to-date. This is the equivalent of "Reload" in Synaptic.
apt update
is equivalent.2.
sudo apt-get upgrade
:This command upgrades all installed packages. This is the equivalent of "Mark all upgrades" in Synaptic.
3.
sudo apt-get dist-upgrade
:apt-get dist-upgrade
does not perform distribution upgrade. visit this for upgrading.apt full-upgrade
is equivalent.4.
sudo apt-get dselect-upgrade
:dpkg
in order to get information through--get-selections
,--set-selections
and--clear-selections
.5.
sudo do-release-upgrade
:-d, --devel-release
to check if upgrading to the latest devel release is possibleNote: All Information is provided with use of manpages, and community help as a reference/source.