Wednesday, May 12, 2021

Upgrading to Ubuntu 21.04 from the command line

Previously, I upgraded my Raspberry Pi 4 from Ubuntu 20.04 to Ubuntu 20.10 from the command line.
 
Ubuntu 21.04 has been out since April, but I did not upgrade because the upgrade path was not official yet. But it seems the upgrade option is now official, as I was prompted about the update when I did a reboot today.
 
So, I decided to take the plunge, and ran 
sudo do-release-upgrade
 
This started the upgrade process, which took a while (around 1 hour 15 minutes for me). There was one prompt along the way and I took the default option.
 
Once the upgrade was done, I did a reboot.
sudo reboot

To get my fan to work, I had to do
sudo pip3 install gpiozero
because the upgrade to Python 3.9 (from Python 3.8) removed the library.

Here's the result from neofetch after upgrading.

Hope this helps those who want to upgrade to Ubuntu 21.04 from the command line. Remember, upgrading a system always comes with risks, so do so at your own risk! I won't be responsible if anything fails. All I can do is share what worked for me.

Note: From the previous upgrade, it seems that third-party repositories may be disabled, and you can try to reenable them by:
sudo sed -i '/deb/s/^#//g' /etc/apt/sources.list.d/*.list
sudo sed -i 's/groovy/hirsute/g' /etc/apt/sources.list.d/*.list
sudo apt update 
(I did not test this as I do not have any such repositories.)

No comments: