Daily Archives: March 4, 2018

How to update google compute engine instance

My google compute engine instance is running Debian.  As I’ve read, those running Centos and Redhat linux have a nightly yum update, but not servers running Debian Linux.  If you’re unsure which version of linux you have, run

cat /proc/version

My Debian Linux Google compute engine has apt-get installed and not yum. Run this command to have it check for and print updates; it won’t install them.

apt list --upgradable

If you haven’t upgraded software in a while, you’ll see a long list of packages that need to be updated.

There are a few different ways to install the updates as described here https://cloud.google.com/compute/docs/security-bulletins and here https://askubuntu.com/questions/194651/why-use-apt-get-upgrade-instead-of-apt-get-dist-upgrade . I usually run

apt-get -y dist-upgrade

Afterward if you run “apt list –upgradable” again it’ll just say “Listing… Done” since nothing needs to be updated.