apt-get dist-upgrade does not upgrade [duplicate]
Solution 1:
The preferred way to upgrade Xubuntu to the newest LTR version is to do:
sudo do-release-upgrade
The manual way you were attempting can be used to upgrade to any version you desire. however, some manual clean up is required after because apt-get will try to resolve the upgrade with the minimal amount of removals.
To manually upgrade:
First run: apt-mark showhold
to be sure nothing is being held back.
If you find held packages then remove the hold and update them I find aptitude
is the easiest way for marking and updating multiple packages at one time. Aptitude will also suggest removal of orphaned packages (packages that are no longer used by anything).sudo apt-get autoremove
will also remove packages that are no longer used.
After your system is fully up to date in the current version, change you sources to point to the version of Xubuntu that you want.
EX: change "trusty" to 'xenial"
Next run this series of commands:
sudo apt-get update
This updates the package listsudo apt-get upgrade
This upgrades packages that can be upgraded without changing other packages. thus easing the dependency resolving in the next step.sudo apt-get dist-upgrade
This upgrades the remaining packages that can be upgraded with a minimal amount of removals.
You now have the new version of Xubuntu, and need to clean up obsoleted packages. Again I find aptitude
to be the easiest way to do this.
Open aptitude and it will already have a list of suggested removals (orphaned packages), it is generally safe to remove them.
Now go through the remaining obsolete packages. In most cases, remaining packages have been replaced with another: ie gt4 with gt5 and gstreamer0.1-good with gstreamer1.0-good. The replacements will be under the heading of new packages.
This step is the most critical and why I like aptitude
, replacing the obsoleted packages will often break other packages; however the broken package usually also has a replacement package to correct dependencies.Aptitude
will list broken packages and recommend fixes. Check over actions to be performed before committing to them.
When you have finish, clean your package cache:
sudo apt-get autoclean
this will remove the package cache for packages that are no longer used.
Solution 2:
sudo apt-get dist-upgrade
Installs the newest kernel and anything else that is held back by a normal apt-get upgrade
. Perhaps you are looking for:
sudo do-release-upgrade