How can I upgrade major Kubuntu versions by command line?

43,258
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.

Share:
43,258

Related videos on Youtube

Sparhawk
Author by

Sparhawk

I like algae.

Updated on September 18, 2022

Comments

  • Sparhawk
    Sparhawk almost 2 years

    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?

    • Sparhawk
      Sparhawk over 10 years
      I see a vote to close, but as I say, this is not a question about the beta specifically. That was just background. This is a generic question about upgrading distributions. It may well have been 13.04 to 13.10.
    • Sparhawk
      Sparhawk over 10 years
      @Braiam Fair call. I edited the question to make it not about the bug part any more.
    • Glutanimate
      Glutanimate over 10 years
      Seeing how the (edited) question now asks for a general alternative of the GUI process of upgrading Kubuntu machines I don't think the close votes are warranted any more. I vote to leave this open.
  • SF.
    SF. about 9 years
    Well, I'm at 14.04 and it says "No new release found" despite 15.10 being out...
  • Sparhawk
    Sparhawk about 9 years
    @SF. Have you got your version numbers correct? It's only June 2015, so 15.10 is not out yet. However, I successfully upgraded from 14.04 to 14.10 using this command, as above.
  • SF.
    SF. about 9 years
    my mistake, 15.04.
  • ka3ak
    ka3ak almost 8 years
    Is it secure? Do I have to do a backup? Do I have to store my settings KMail etc.?
  • Sparhawk
    Sparhawk almost 8 years
    @ka3ak This sounds like another question. Possibly two, at least.
  • ka3ak
    ka3ak almost 8 years
    @Sparhawk Yes. But it sounded to brave to me. You do this and that. But whether it is safe... I'm considering whether do it or not.
  • Sparhawk
    Sparhawk almost 8 years
    @ka3ak Oh, I see what you mean. "Secure" implied "security" from malicious parties to me. Well, I suspect that upgrading from command line is probably exactly what the GUI does as a backend, so it should be identically "safe" as a normal upgrade.