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
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:
Copied in a backup directory all custom files on
/etc/apt/sources.list.d/
(i.e. all files butappcenter.list
,elementary.list
andpatches.list
) which are custom sources with specific mods for elementaryOS. These need to be update along with "standard" Ubuntu packages;Made sure my system was up to date (
sudo apt update
andsudo apt dist-upgrade
) before editing my source files;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;Substituted all occurrences of
xenial
withbionic
(i.e.sudo sed 's/xenial/bionic/' -i /etc/apt/sources.list
andsudo sed 's/xenial/bionic/' -i /etc/apt/sources.list.d/*.list
;Log out from graphical system (just to be safe, it might work even logged into the graphical desktop);
Open a console terminal (Ctrl+Alt+F1);
Logged in and shut down graphical system (
sudo systemctl stop lightdm
);Upgraded my system:
sudo apt-get update sudo apt-get dist-upgrade
Rebooted and checked that all went well;
Restored all my custom sources in
/etc/apt/sources.list.d
(and substitutedxenial
withbionic
where applicable);Another pass of:
sudo apt-get update
andsudo 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.– user170Oct 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
;) 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
– user170Oct 18, 2018 at 7:46 -
1@cipricus I don't have any ppa on my system which references
loki
orjuno
. If you're talking aboutappcenter.list
,patches.list
, etc, they simply hadxenial
which I changed tobionic
. I think eOS ppa's just use the Ubuntu version they're based on. Oct 18, 2018 at 9:01 -
1@MrShunz your soloution worked for me. Marked your answer as solved :)– yuki-93Oct 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:
- 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
sudo apt-get remove wingpanel-indicator-ayatana
when the upgrade is completesudo apt-get remove appstream-data-pantheon-loki*
when the upgrade is complete (2 packages will match and be removed)- Select a new desktop background, as the old ones we had from Loki were removed