How to upgrade Debian Linux distro

3,545 views
Skip to first unread message

B3nd3r

unread,
Nov 4, 2017, 12:08:11 PM11/4/17
to gce-discussion
Hello,

I have a instance running Debian 8 and I want to upgrade it to Debian 9. How do we do that?

I have ran the following:

sudo apt update && sudo apt upgrade -y


It has updated a bunch of things and then I ran

sudo apt dist-upgrade 

but it says there is 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


How do we upgrade our linux distros, is it something we have to contact google team to do or a script we can run?


Thanks in advance.


Kamran (Google Cloud Support)

unread,
Nov 4, 2017, 7:31:12 PM11/4/17
to gce-discussion

We already support both Debian 8 and Debian 9 images. Please visit this article for a list of public images provided by Compute Engine.

Shuang Gao

unread,
Nov 22, 2017, 7:55:16 PM11/22/17
to gce-discussion
I think B3nd3r was asking if an existing instance running Debian 8 can be updated to Debian 9 without having to set up a Debian 9 instance and migrate everything across.  
Can anyone answer this? 
Thanks
Sean

Ritesh Sarraf

unread,
Jan 3, 2018, 9:40:37 AM1/3/18
to gce-discussion
I have an identical setup running Debian 8 on GCE and would like to upgrade it to Debian 9.
Does GCE have a howto or Known Issues page ?

Thanks,
Ritesh

Michael Potter

unread,
Jan 4, 2018, 12:50:49 PM1/4/18
to gce-discussion
Deb 8 can be inline upgraded to 9 but your level of success is going to depend entirely on what other software your server is running. I'd recommend taking a snapshot, creating a VM from it and then attempting the upgrade on that as there's a lot of potential pitfalls you can run into (what I did when evaluating the early pre-releases Google did before 9 was launched officially).

Deb docs: https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.html
A simpler guide: https://linuxconfig.org/how-to-upgrade-debian-8-jessie-to-debian-9-stretch

Shouldn't be anything GCE specific you'll run into but it's not going to be as "safe" to do as just installing a deb 9 fresh and configuring your environment on it from scratch.
Again in bold - it's possible but there's a lot of issues you can run into so take a lot of care if you're not confident on doing it

Calgary Fasteners

unread,
Apr 13, 2018, 2:56:11 PM4/13/18
to gce-discussion
Hi,
I upgraded to Debian 9 without hardly any issues. This was 2 months ago.
Now, when I try to run apt-get update. It seems after the Debian fetches, it connects to Google to fetch Google updates, however
the lines that I see are all related to Jessie and not Stretch:
Hit:10 http://packages.cloud.google.com/apt google-cloud-packages-archive-keyring-jessie InRelease
Hit:11 http://packages.cloud.google.com/apt google-compute-engine-jessie-stable InRelease
Reading package lists... Done
When I do the same thing on a new Debian 9 instance from Google, it lists:
Hit:6 http://packages.cloud.google.com/apt cloud-sdk-stretch InRelease
Hit:7 http://packages.cloud.google.com/apt google-compute-engine-stretch-stable InRelease
Hit:8 http://packages.cloud.google.com/apt google-cloud-packages-archive-keyring-stretch InRelease
Reading package lists... Done

Here they tell you, how to install the Google environment. However I also noticed the /etc//apt/sources.list.d/ with some google links referring to Jessie instead of Stretch, so I updated them.
Then I removed the Google packages (dpkg-query -l | grep google  +  apt-get remove)
Then I followed the instructions:
( curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -) + apt-get update + the tiny shell loop
all google packages got reinstalled.

After I did that, the same command now lists:

Hit:9 http://packages.cloud.google.com/apt google-cloud-compute-stretch InRelease
Hit:10 http://packages.cloud.google.com/apt google-cloud-packages-archive-keyring-stretch InRelease
Hit:11 http://packages.cloud.google.com/apt google-compute-engine-stretch-stable InRelease

So, I have it fixed.

I would say, it is not that hard to upgrade to Stretch to make it work.
Thx. Gary
Reply all
Reply to author
Forward
0 new messages