now as Juno (0.5) is stable and released, how can one update from loki? I only find questions regarding the beta release. Is there a way to perform the update with apt? Is is save to edit the sources.list?


2 Answers 2


While the "suggested" upgrade path is to install Juno from scratch, and if you have your /home as a separate partiton might be the best method to be safe, I've just updated both my PCs with the apt method and all went well.

Since Juno is based on Ubuntu 18.04 (bionic) while Loki in based on 16.04 (xenial) it was a simple matter of substituting all occurrences of xenial with bionic on /etc/apt/sources.list and /etc/apt/sources.list.d/*.list.

The exact procedure was:

  1. Copied in a backup directory all custom files on /etc/apt/sources.list.d/ (i.e. all files but appcenter.list, elementary.list and patches.list) which are custom sources with specific mods for elementaryOS. These need to be update along with "standard" Ubuntu packages;

  2. Made sure my system was up to date (sudo apt update and sudo apt dist-upgrade) before editing my source files;

  3. Removed my custom lists from /etc/apt/sources.list.d (of which I had a backup copy as per #1). For example I have custom sources for Google Chrome, wine, virtualbox, etc. which are neither in standar Ubuntu repos nor in elementary OS ones;

  4. Substituted all occurrences of xenial with bionic (i.e. sudo sed 's/xenial/bionic/' -i /etc/apt/sources.list and sudo sed 's/xenial/bionic/' -i /etc/apt/sources.list.d/*.list;

  5. Log out from graphical system (just to be safe, it might work even logged into the graphical desktop);

  6. Open a console terminal (Ctrl+Alt+F1);

  7. Logged in and shut down graphical system (sudo systemctl stop lightdm);

  8. Upgraded my system:

    sudo apt-get update
    sudo apt-get dist-upgrade
  9. Rebooted and checked that all went well;

  10. Restored all my custom sources in /etc/apt/sources.list.d (and substituted xenial with bionic where applicable);

  11. Another pass of: sudo apt-get update and sudo apt-get dist-upgrade to upgrade all the software which came from custom sources.

apt was complaining of a missing GPG key during the sudo apt update at #8:

Err:4 http://packages.elementary.io/appcenter bionic InRelease                       
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A74F73EFFE70B91C

which was resolved with

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A74F73EFFE70B91C
sudo apt update

Also, on one of my PCs, I had a conflict with the package linux-tools-4.15.0-36-generic which I resolved with

 sudo apt-get purge linux-hwe-tools-4.15.0-36 linux-tools-generic-hwe-16.04 linux-tools-4.15.0-36-generic

and then resumed the upgrade with

sudo apt --fix-broken install

A final touch was:

sudo apt autoremove --purge

to remove unused/obsoleted packages.

Obviously, if you choose to follow this path (and if you choose to install Juno from scratch, too) it's always a good idea to have a full backup of your system. Well, it should be a good idea to have an up to date backup of your data even if not upgrading.

A little annoyance was that Juno completely dropped support for "system tray icons". This has nothing to do with the upgrade, it's a "feature" of Juno, and I was a little surprised that, for example, Dropbox icon wasn't showing. Again, it has nothing to do with the upgrade, and there's a workaround which works for fresh installs, too.

  • better strongly recommend backup of all important data!! -- and then, if it doesn't work (I'm a bit skeptical: is it possible to go from 16.04 to 18.04 directly, even in Ubuntu?) - well, there is the cleaner way of installing Juno from scratch. - Very interesting anyway. The tty update/upgrade might be the trick.
    – user170
    Commented Oct 18, 2018 at 7:36
  • 1
    @cipricus You're right about backing up and reinstalling, I'm editing my answer right now. Also, I've upgraded tons of Ubuntu systems from LTS to LTS versions, with a simple do-release-upgrade ;) Commented Oct 18, 2018 at 7:41
  • This is indeed worth a try in my case, never heard about this in elementary. Only here (elementaryos.stackexchange.com/a/5092/170) there is a beginning of a discussion. Could you give as much info as possible in your answer as what each step is doing? could you explain how your solution fixes the problem mentioned by @ounos in a comment under the linked answer? - namely : an LTS to LTS upgrade it's possible of course when we are talking about Ubuntu. The problem with elementary OS is that during upgrade all third party sources are disabled including eOS ppa
    – user170
    Commented Oct 18, 2018 at 7:46
  • 1
    @cipricus I don't have any ppa on my system which references loki or juno. If you're talking about appcenter.list, patches.list, etc, they simply had xenial which I changed to bionic. I think eOS ppa's just use the Ubuntu version they're based on. Commented Oct 18, 2018 at 9:01
  • 1
    @MrShunz your soloution worked for me. Marked your answer as solved :)
    – yuki-93
    Commented Oct 18, 2018 at 9:08

This is a really good writeup. I used it twice to update 2 laptops for my family. The only additional steps I did are:

  1. take a screenshot of the dock, so you remember what apps were on the dock, and can put icons back in the same order after the update
  2. sudo apt-get remove wingpanel-indicator-ayatana when the upgrade is complete
  3. sudo apt-get remove appstream-data-pantheon-loki* when the upgrade is complete (2 packages will match and be removed)
  4. Select a new desktop background, as the old ones we had from Loki were removed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.