Skip to content
ProHomeLab
RU

Linux

How to Upgrade Linux Server Distributions

Stilicho20112 min read18 views

Also available in: RU

Part 7 of 24 in the series Self-Hosting
  1. Pros and Cons of Fedora Server 42
  2. Linkwarden Overview - A Modern Self-Hosted Bookmark Manager
  3. PostgreSQL and pgAdmin in Docker - Beginner Setup Guide
  4. Mealie Recipe Manager - Self-Hosted Meal Planning on Docker
  5. Vaultwarden in Docker - Your Own Password Vault, Not Bitwarden's
  6. Diun - Get Notified When Your Docker Images Have Updates
  7. How to Upgrade Linux Server Distributions
  8. How to Start a Homelab - Hardware, Hypervisor, and Your First Service
  9. The Best Self-Hosted Apps of 2025 - A Personal Roundup
  10. Best Bookmark Manager - Linkwarden or Karakeep
  11. BookLore - A Self-Hosted Library and Reader for Your Book Collection
  12. Grimmory - A Self-Hosted Library and Reader for Your Book Collection
  13. Pangolin Tunnel Setup - Expose Homelab Services Without Ports
  14. NetBird Self-Hosted - Mesh VPN Without Port Forwarding
  15. Postiz - Trying to Automate YouTube, VK, and RuTube, and Why Only One Out of Three Actually Works
  16. Connecting Applications to a Shared PostgreSQL and Learning Basic Maintenance - Part 2
  17. Dozzle - A Convenient Real-Time Log Viewer for Docker Containers
  18. Docker Hit Its Network Limit - How I Diagnosed and Fixed It with default-address-pools
  19. Gotify - Your Own Push Notification Server for the Hypervisor and Beyond
  20. Forgejo + Komodo - Turning Docker Compose into GitOps
  21. GitOps for Homelab - Deploying Forgejo and Komodo From Scratch
  22. GitLab, Gitea, and Forgejo. A Comparison for Grown-Ups - What Actually Fits Your Homelab
  23. Auto-Updating Docker Containers - Renovate + Forgejo + Komodo
  24. Matrix Synapse - Setting Up Your Own Server for Decentralized Chat
Contents

How to Upgrade Linux-Based Server Distributions

Upgrading Debian, Ubuntu Server, and Fedora Server Versions

Upgrading the operating system is an important step for maintaining security, stability, and getting new features. In this article we'll look at how to safely upgrade versions of popular server distributions: Debian, Ubuntu Server, and Fedora Server.


1. Debian

Debian is known for its stability, but upgrading to a new version may require some preparation steps.

Upgrade Procedure

  1. Check the current version
yaml
lsb_release -a

or
cat /etc/debian_version

  1. Update the current packages
yaml
sudo apt update
sudo apt upgrade -y
sudo apt full-upgrade -y
sudo apt autoremove -y
  1. Change the package sources

Edit the /etc/apt/sources.list file, replacing the old release name with the new one:

yaml
# Old:
deb http://deb.debian.org/debian/bullseye main contrib non-free
# New:
deb http://deb.debian.org/debian/bookworm main contrib non-free
  1. Upgrade to the new version
yaml
sudo apt update
sudo apt upgrade -y
sudo apt full-upgrade -y
sudo reboot
  1. Check the version after the upgrade
yaml
lsb_release -a

2. Ubuntu Server

Ubuntu Server is upgraded using do-release-upgrade.

Upgrade Procedure

  1. Check the current version
yaml
lsb_release -a

2. Update all packages of the current version

yaml
sudo apt update
sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo apt autoremove -y

3. Run the version upgrade

yaml
sudo do-release-upgrade

If the upgrade doesn't start, make sure the update-manager-core package is installed:

yaml
sudo apt install update-manager-core

4. Follow the upgrade wizard's instructions
Usually you'll need to confirm replacing configuration files and a reboot.

5. Check the version after the upgrade

yaml
lsb_release -a

3. Fedora Server

Fedora Server uses the dnf tool to upgrade to a new version.

Upgrade Procedure

  1. Check the current version
yaml
cat /etc/fedora-release
  1. Update the current system
yaml
sudo dnf upgrade --refresh -y
sudo dnf autoremove -y
  1. Install the version-upgrade plugin
yaml
sudo dnf install dnf-plugin-system-upgrade -y
  1. Download the new version
yaml
sudo dnf system-upgrade download --releasever=43

Replace 43 with your target Fedora version.

  1. Apply the upgrade
yaml
sudo dnf system-upgrade reboot
  1. Check the version after the upgrade
yaml
cat /etc/fedora-release

4. Cheat Sheet - Upgrading Debian, Ubuntu Server, and Fedora Server

This table contains the main commands for safely upgrading Linux server distributions.

Distribution Check Version Update Current Packages Upgrade OS Version Notes
Debian lsb_release -a
cat /etc/debian_version
sudo apt update && sudo apt upgrade -y && sudo apt full-upgrade -y && sudo apt autoremove -y 1. Change /etc/apt/sources.list to the new version
2. sudo apt update && sudo apt upgrade -y && sudo apt full-upgrade -y && sudo reboot
Upgrading via apt requires carefully editing the package sources.
Ubuntu Server lsb_release -a sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y sudo do-release-upgrade Make sure update-manager-core is installed. Follow the wizard's instructions.
Fedora Server cat /etc/fedora-release sudo dnf upgrade --refresh -y && sudo dnf autoremove -y 1. sudo dnf install dnf-plugin-system-upgrade -y
2. sudo dnf system-upgrade download --releasever=<target_version>
3. sudo dnf system-upgrade reboot
Replace <target_version> with the desired Fedora version.

5. Upgrade Recommendations

  • Always back up important data before upgrading.
  • Read the official guides and release notes for the version you're upgrading to.
  • On servers with critical services, it's better to test the upgrade on a separate machine or virtual environment first.
  • After upgrading, check the status of services and logs (systemctl status and journalctl).

In summary, the upgrade process differs slightly between Debian/Ubuntu and Fedora, but the basic principle is the same - first update the current packages, then safely move to the new version using the built-in tools.