Ubuntu – How to upgrade major Kubuntu versions by command line

aptkubuntuupgrade

The recommended way to upgrade Kubuntu versions is using kubuntu-devel-release-upgrade, which opens up a GUI window.

Is there a purely command-line method for distribution upgrades?

Background

When attempting to upgrade using the GUI, it progressed through "Preparing to upgrade", "Setting new software channels" and "Getting new packages", and then stalled on "Installing the upgrades". A window popped up saying:

Could not install the upgrades. The upgrade has aborted. Your system
could be in an unusable state. A recovery will run now (dpkg –configure -a).

I clicked "OK" (or was it "close"?), and the GUI now was stuck at 45%. I could no longer scroll the in-built terminal output, and the GUI window appeared to be stuck.

Looking at the terminal from which I launched kubuntu-devel-release-upgrade, I can see

Configuration file '/etc/apport/crashdb.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.

This launch-terminal did not accept input. I killed the GUI process from the launching terminal, then ran dpkg --configure -a, which seems to continue where I left off, presenting me again with the above query.

From the GUI, it seemed like there were two more steps: "Cleaning up" and "Restarting the computer". Is the former merely sudo apt-get --purge autoremove and sudo apt-get autoclean?

I presume that this hang was due to the GUI "Distribution Upgrade" window being unable to accept text input.

In the future, is there a purely command-line method for distribution upgrades?

Best Answer

sudo do-release-upgrade -d

I used this to upgrade to 14.10, and it worked fine, including allowing me to respond to prompts such as in the question above.

Related Question