Linux
How to Upgrade Linux Server Distributions
Also available in: RU

Part 7 of 24 in the series Self-Hosting
- Pros and Cons of Fedora Server 42
- Linkwarden Overview - A Modern Self-Hosted Bookmark Manager
- PostgreSQL and pgAdmin in Docker - Beginner Setup Guide
- Mealie Recipe Manager - Self-Hosted Meal Planning on Docker
- Vaultwarden in Docker - Your Own Password Vault, Not Bitwarden's
- Diun - Get Notified When Your Docker Images Have Updates
- How to Upgrade Linux Server Distributions
- How to Start a Homelab - Hardware, Hypervisor, and Your First Service
- The Best Self-Hosted Apps of 2025 - A Personal Roundup
- Best Bookmark Manager - Linkwarden or Karakeep
- BookLore - A Self-Hosted Library and Reader for Your Book Collection
- Grimmory - A Self-Hosted Library and Reader for Your Book Collection
- Pangolin Tunnel Setup - Expose Homelab Services Without Ports
- NetBird Self-Hosted - Mesh VPN Without Port Forwarding
- Postiz - Trying to Automate YouTube, VK, and RuTube, and Why Only One Out of Three Actually Works
- Connecting Applications to a Shared PostgreSQL and Learning Basic Maintenance - Part 2
- Dozzle - A Convenient Real-Time Log Viewer for Docker Containers
- Docker Hit Its Network Limit - How I Diagnosed and Fixed It with default-address-pools
- Gotify - Your Own Push Notification Server for the Hypervisor and Beyond
- Forgejo + Komodo - Turning Docker Compose into GitOps
- GitOps for Homelab - Deploying Forgejo and Komodo From Scratch
- GitLab, Gitea, and Forgejo. A Comparison for Grown-Ups - What Actually Fits Your Homelab
- Auto-Updating Docker Containers - Renovate + Forgejo + Komodo
- 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
- Check the current version
lsb_release -aor
cat /etc/debian_version
- Update the current packages
sudo apt updatesudo apt upgrade -ysudo apt full-upgrade -ysudo apt autoremove -y- Change the package sources
Edit the /etc/apt/sources.list file, replacing the old release name with the new one:
# Old:deb http://deb.debian.org/debian/bullseye main contrib non-free
# New:deb http://deb.debian.org/debian/bookworm main contrib non-free- Upgrade to the new version
sudo apt updatesudo apt upgrade -ysudo apt full-upgrade -ysudo reboot- Check the version after the upgrade
lsb_release -a2. Ubuntu Server
Ubuntu Server is upgraded using do-release-upgrade.
Upgrade Procedure
- Check the current version
lsb_release -a2. Update all packages of the current version
sudo apt updatesudo apt upgrade -ysudo apt dist-upgrade -ysudo apt autoremove -y3. Run the version upgrade
sudo do-release-upgradeIf the upgrade doesn't start, make sure the
update-manager-corepackage is installed:
sudo apt install update-manager-core4. 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
lsb_release -a3. Fedora Server
Fedora Server uses the dnf tool to upgrade to a new version.
Upgrade Procedure
- Check the current version
cat /etc/fedora-release- Update the current system
sudo dnf upgrade --refresh -ysudo dnf autoremove -y- Install the version-upgrade plugin
sudo dnf install dnf-plugin-system-upgrade -y- Download the new version
sudo dnf system-upgrade download --releasever=43Replace
43with your target Fedora version.
- Apply the upgrade
sudo dnf system-upgrade reboot- Check the version after the upgrade
cat /etc/fedora-release4. 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 -acat /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 version2. 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 statusandjournalctl).
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.


