I am trying to upgrade my computer. I am using apt-get. This is the command I am typing:

root@alphabeta:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I am confused. I cannot understand why apt-get does not download a newer version of Xubuntu 16.04, Xenial Xerus LTS from the Xubuntu 17.04, Zesty Zapus and install xubuntu upgrade.

I have updated my repositories before trying to use the command line argument apt-get update.

The links that are associated to not answer my question I do not think it is a problem with my repository I do not understand why apt-get returned saying there was nothing to upgrade: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded, the only thing I thought to do is clean my cache.

I would really like a better answer the information I received from asking about disk formatting with hdparm was excellent.

aptitude is nt my forte I learn as I go like lsof I cannot remember all the command line arguments.


2 Answers 2


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 list
sudo 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.

  • are you saying that packages reported as being kept back is what is causing do-release-update to tell me I need to install all available updates first, while trying to upgrade tells me there is nothing to do?
    – Michael
    Oct 22, 2020 at 23:50
  • and why are packages marked to be kept back? i didn't do it, is it possible that not doing so will break something?
    – Michael
    Oct 22, 2020 at 23:51
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
  • sudo apt-get dist-upgrade isn't just kernels. it will update/upgrade everything to the newest version available in the repositories. To do what he wants, his source lists must first be pointed to a newer version of ubuntu.
    – ravery
    Jul 24, 2017 at 12:21
  • 1
    @ravery Forgive me, but I've never done an in-place upgrade before: Why would OP have to point his source lists to a newer version?
    – wjandrea
    Jul 24, 2017 at 12:22
  • @ravery edited. Jul 24, 2017 at 12:24
  • @wjandrea -- OP was trying to upgrade via the debian method. this answer incorrectly says that sudo dist-ugrade only upgrade kernel. If the sources are not changed nothing will be upgraded.
    – ravery
    Jul 24, 2017 at 12:25
  • @ravery But that's why Ubuntu has do-release-upgrade Jul 24, 2017 at 12:26

Not the answer you're looking for? Browse other questions tagged .