Question

How to upgrade the distribution used by my droplet?

I’ve been running a droplet for years for doing my email and hosting a couple web sites, among other things. It’s running an ancient Ubuntu 18.04 distro and I was wondering if there was a reasonable way to upgrade the distro on the droplet without going through the process of spinning up another droplet along with all the configuration that that would entail. Or should I just let sleeping dogs lie, as long as things are functioning OK?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
November 9, 2024

Heya,

The first and most important thing before you begin is to create a Snapshot of your Droplet in it’s current configuration where it works!

https://docs.digitalocean.com/products/snapshots/

Snapshots are on-demand disk images of DigitalOcean Droplets and volumes saved to your account. Use them to create new Droplets and volumes with the same contents.

Now, once you have that, you just need to run

apt update
apt upgrade
do-release-upgrade

every time you up your distribution and follow the steps. Nothing more than that.

Bobby Iliev
Site Moderator
Site Moderator badge
November 8, 2024

Hey!

I recently answered a similar question about this here:

https://www.digitalocean.com/community/questions/easy-restart-question

There are a few things to consider here, but before making any upgrades it is always recomended to have a backup of your server. That way in case of anything going wrong, you can restore back to a working version of your server.

Ideally, I think the safest path that maximizes speed is to make a snapshot, make a duplicate Droplet from it, run do-release-upgrade on the duplicated Droplet. If it works, then you can decide how important that IP and uptime is to you and either stick with the new one or upgrade the old one. If it doesn’t, you know to set aside some time and then do a migration-style.

I would recommend going over that question above as it covers everything more in-depth!

If you decide to go with the upgrade, you can start with an upgrade from 18.x to 20.x first as described in this guide here:

https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-ubuntu-20-04-focal-fossa

Let me know if you have any questions!

- Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.