Problems activating your account? Send notification email to: [email protected]
Host4Fun Budget VPS Hosting
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Easy way to upgrade Debian 9 to Debian 10
#1
Hello Post4VPS Community

I would like to share the follow account of experience and a brief guide about how to upgrade Debian 9 to Debian 10 in a few easy steps. First I'd like to explain why I'm posting this. I have been taking part in the December giveaway and won a VPS. In my applicaton I requested the OS Debian 10 to be installed on the VPS and noted that Debian 9 can be installed if Debian 10 is not available. So it looks like Debian 10 was not available but thankfully Debian 9 was installed for me. I decided to upgrade Debian 9 to Debian 10 myself. Here is how I did i in a few steps.

Warning: Debian might be generally a very stable OS but distribution upgrades are something that can be rated as dangerous and should be handled with care. I don't recommend to dist upgrade a long running server with applications and other things already running on it. Even if you decide to do so take backups! Things could go wrong and the server could be rendered unusable! Therefore I would like to explain that I'm not responsible for any damage that might happen to any server when performing a distribution upgrade. I recommend only to do this on a fresh installed Debian 9 VPS where you have nothing to lose!


Let's get started with the guide.

1. Login into your Debian 9 VPS as root or a user that can use sudo via SSH or any other different way (direct TTY, emergency SSH, VNC or whatever else you have available).

2. First you have to get the current system up to date. To do so run the commands below in the order given.
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
(Don't forget to apply sudo before the commands if you use a non root user!)

- The first command will update the package database on your machine which in return will compose a list of packages that can be updated.
- The second command will actually update the packages that have updates available for them.
- The third command will update some packages that have been hold back like the kernel and firmware.

Everything on the current system has to be up to date to avoid possible issues with package version mismatch and other things that can happen when you skip ahead package versions during updates.

3. Take a backup of your sources.list by using the command below.
cp /etc/apt/sources.list /etc/apt/sources.list.backup
(Don't forget to apply sudo before the commands if you use a non root user!)

4. Open the /etc/apt/sources.list file, wipe all the content in it and paste the following Debian 10 package sources into the file using a text editor like nano, vi or vim. When opening the file don't forget to use sudo if you use a non root user account.

Debian 10 package sources:
deb http://httpredir.debian.org/debian buster main
deb http://httpredir.debian.org/debian buster-updates main
deb http://security.debian.org buster/updates main

5. Update the package database again and finally upgrade all packages and kernel to Debian 10 level by using the commands below.
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
(Don't forget to apply sudo before the commands if you use a non root user!)

You might notice that this are the commands as from a few steps ago. So it's really that simple to perform the upgrade after changing the package sources.

You will be asked if you want to restart system services automatically or manually. Simply choose to restart all necessary services automatically. This will simply save you some work and steps.

6. After all packages have been upgraded to Debian 10 you can do a little clean up. To clean up no longer needed packages and files run the command below.
apt-get --purge autoremove -y
(Don't forget to apply sudo before the commands if you use a non root user!)

7. Finally restart your server to boot into the new Debian 10 kernel and you are done with the upgrade.


This has worked flawless for me. I'm not running Debian 10 on my VPS 16. In the paste I upgraded Debian 8 to Debian 9 to Debian 10 on a NanoKVM VPS without any issues.

This is one way to get the latest Debian version if your provider doesn't provide it or you don't want to reinstall your OS again.


Reply
#2
Man! You just anticipated me on this tutorial, I had already ready a word file with the text, only the typesetting was needed  Troll
I had to perform this on my VPS 9 so I was going to documentate this process.

Unfortunately I have to say that despite Ubuntu comes from Debian, Ubuntu on updating is more dangerous and often thing goes wrong. I tried a similar updating process on both Ubuntu and Ubuntu Server and seems that Debian handle the update better.

I was going to make a tutorial on updating CentOS 7 to CentOS 8, but this process isn't supported by the community and no official instructions are given. I tested it on a mininal CentOS 7 installation inside a VM and on a first seen seems to work, what do you think about it @Hidden Refuge?

CentOS 7 to CentOS 8 is a very BIG JUMP, a lot of things changes but well the new CentOS rocks!

Can I list this tutorial on my tutorial's list?
Thanks to Post4VPS and VirMach for VPS 9 - Buffalo!
Reply
#3
@LightDestory

I'm not a CentOS user anymore since at least over three years or even much longer. I never really tried or bothered to perform a distribution upgrade on CentOS because there basically was no word about it available in any official or inofficial documentation (at least searches always turned up totally unrelated articles or links to sites/guides where the upgrade process was described as impossible).

Try your luck I guess.

Yes, you can list this guide in your tutorial list Smile .
Reply
#4
I'm not much of a Debian user, but I do use it when I have to. For example, when setting up a Docker image and the idiosyncrasies of a software are too Debian-centric.

Anyway, for what it's worth, I can confirm that using the method outlined in the OP, it is possible to upgrade from Debain 8 (Jessie) to Debain 9 (Stretch) and from Debain 9 (Stretch) to Debian 10 (Buster) in two consecutive steps.

The only difference between my process and the OP is when it comes to editing the sources.list file:
> For Jessie to Stretch Upgrade:
[email protected]:~# sed -i 's/jessie/stretch/g' /etc/apt/sources.list

> For Stretch to Buster Upgrade:
[email protected]:~# sed -i 's/stretch/buster/g' /etc/apt/sources.list

I achieved this on Phoenix-based VPS-9 which came with Debian Jessie.

Never saw an OS that easy to upgrade!!.. but it felt weird for me to have to manage a non-RedHat-based Linux system.. The naming changes, the assumptions and on and on..

I did ask for an OS change though; the above was just for testing.
Reply
#5
i have vps-9. can i do it myself to upgrade my debian? or i need admin assistance. vps-9 havn't virtualizer or cp.
Heart LOVE FOR ALL  HATRED FOR NONE Heart
Reply
#6
(04-07-2020, 01:23 PM)sagher Wrote:  i have vps-9. can i do it myself to upgrade my debian? or i need admin assistance. vps-9 havn't virtualizer or cp.

This can be done on VPS 9 since it’s all done using SSH, no panel is involved 


HOWEVER, I do not recommend doing it on VPS 9. Since if anything goes wrong, you’ll then need to request an OS re-install which the admins can only do for you. And due to the fact that the admins constantly emphasize that VPS 9 owners should never perform anything risky, I doubt that they’ll be happy with that request.
Special thanks to Post4VPS and VirMach for providing me with VPS9! It is insanely powerful and fast!
Reply
#7
(04-07-2020, 05:45 PM)ikk157 Wrote:  This can be done on VPS 9 since it’s all done using SSH, no panel is involved 


HOWEVER, I do not recommend doing it on VPS 9. Since if anything goes wrong, you’ll then need to request an OS re-install which the admins can only do for you. And due to the fact that the admins constantly emphasize that VPS 9 owners should never perform anything risky, I doubt that they’ll be happy with that request.

Well it depends, updating Debian to a next major release (version installed to version_installed+1) is not a critical process and you can improve your success rate by doing the update process on a fresh install of the OS.

I personally did it after the KVM refresh and it worked without any issue.

This tutorial is super detailed and if you follow it you will get a fully updated and working Debian Smile
Thanks to Post4VPS and VirMach for VPS 9 - Buffalo!
Reply
#8
(04-07-2020, 11:39 PM)LightDestory Wrote:  Well it depends, updating Debian to a next major release (version installed to version_installed+1) is not a critical process and you can improve your success rate by doing the update process on a fresh install of the OS.

I personally did it after the KVM refresh and it worked without any issue.

This tutorial is super detailed and if you follow it you will get a fully updated and working Debian Smile

Well you just described one of the issues, you’ll need to request a fresh OS install to increase your success rate. Which brings it back to my point.

I personally believe that you shouldn’t upgrade unless you really have to. Will save the admins here a lot of work. 

It’s just not a risk worth taking if you’re just upgrading for the sake of upgrading.
Special thanks to Post4VPS and VirMach for providing me with VPS9! It is insanely powerful and fast!
Reply
#9
Thank you Hidden_refuse for the tutorial to update the Debian OS to 10. I have tried this and it works. I was able to update Debian OS in a VPS where the provider had some limited OS to work with.

Make sure you make backup when you update/upgrade anything.
Reply
 


Possibly Related Threads...
Thread Author Replies Views Last Post
  How to Install TeamSpeak3 on Debian/Ubuntu sAmI 0 84 08-08-2020, 10:48 PM
Last Post: sAmI
Rainbow Easy way to install a seedbox (rtorrent+rutorrent) on Ubuntu Amresh 7 139 07-17-2020, 03:56 PM
Last Post: deanhills
Brick Installing Docker & Portainer on Debian 10 Hidden Refuge 0 1,411 12-13-2019, 06:41 PM
Last Post: Hidden Refuge
  How to install Bright Game Panel in Debian Dynamo 48 33,328 11-14-2019, 04:03 AM
Last Post: Dynamo
  Setting Up MyBB Forum On a Linux Server ( Ubuntu / Debian ) Rehan 4 560 09-03-2019, 12:55 PM
Last Post: sohamb03

Forum Jump:


Users browsing this thread: 1 Guest(s)

Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis


About Post4VPS

Post4VPS is a forum/destiny where you can Delploy Your Free VPSs just by the Power of Posts.

We Provide VPSs of many locations like Germany,US,Canada,France,London,etc.

We also Provide VPSs of Both Linux and Windows OS.