deb based distributions provide apt or apt-get to manage packages interactively and from network repositories. While updating packages
dist-upgrade can be used. But what is the difference between these two commands. In this tutorial, we will look at this issue.
updatecommand will simply get the packages information from repositories. These repositories are remote internet sites that provide packages and their metadata. We will get metadata or package information and then compare it with locally installed or downloaded package information and metadata. This will not download any packages.
$ sudo apt update
The real update operation will be down with
upgrade command. This command will download packages and upgrade accordingly. So
upgrade command will be run after
update command. We should have root privileges in order to completely update operation so we will use
$ sudo apt upgrade
dist-upgrade command is very similar to
upgrade command. This command will upgrade too but during the upgrade, there will be some prompts related to package configuration. In
dist-upgrade this questions will be answered automatically by
apt which will make our upgrade operation more easy and intelligent.
$ sudo apt dist-upgrade
full-upgrade is the same as
dist-upgrade so we can use both command interchangeable.