Will apt-get dist-upgrade upgrade my system to a newer version? [duplicate]
Solution 1:
You can read the man-page of apt-get
to see what each command do.
Open the manual
man apt-get
Find the section dist-upgrade
and read
dist-upgrade
in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. So, dist-upgrade command may remove some packages. The /etc/apt/sources.list file contains a list of locations from which to retrieve desired package files. See also apt_preferences(5) for a mechanism for overriding the general settings for individual packages
See also: What is “dist-upgrade” and why does it upgrade more than “upgrade”?
In order to upgrade Ubuntu to a newer release you have to run in terminal
sudo do-release-upgrade
We read from the man-page
man do-release-upgrade
DESCRIPTION
Upgrade the operating system to the latest release from the command-line. This is the preferred command if the machine has no graphic environment or if the machine is to be upgraded over a remote connection
Solution 2:
No, sudo apt-get dist-upgrade
will not upgrade to a new Ubuntu release. It will just install available updates for the Ubuntu release you already have installed.
Unlike sudo apt-get upgrade
it may install new packages or remove installed packages if that is necessary to satisfy dependencies. So be careful when using it.
Solution 3:
If you do not want to upgrade to non-LTS versions, follow these steps:
Open Ubuntu Software Center.
Go to Edit -> Software Sources.
Go to the Updates tab and make sure you have selected For long-term support versions in the Notify of a new Ubuntu version.
Open a terminal and run
sudo apt-get update
(just to be sure :) ).Now, when you run
sudo apt-get dist-upgrade
it'd be upgraded to the next LTS version and not non-LTS versions.