Canonical does not provide do-release-downgrade. If you are on Ubuntu 21.04 (Hirsute Hippo) and want Ubuntu 20.04 LTS (Focal Fossa) back, the supported answer is restore a backup or reinstall—not reverse the release in place.
The unsupported path retargets /etc/apt/sources.list to focal, adds an apt preferences pin file so older packages win over what is installed, and runs aptitude dist-upgrade. The walkthrough below follows that order on a lab host named foc-ubuntu21. Files under /home were still there when the downgrade finished; plan for broken desktop packages, repeat aptitude runs, and a reboot before you call the system healthy.
Tested on: Ubuntu 21.04 (Hirsute Hippo) at start; finished on Ubuntu 20.04.5 LTS (Focal); kernel
5.11.0-49-genericduring the downgrade run.
gdm3, GRUB, or libc6 configuration fails mid-hop, restore the backup instead of pushing through on a hybrid system. See backup and rollback options.
Quick command summary
| Task | Command |
|---|---|
| Confirm release | cat /etc/os-release |
| Back up sources | sudo cp /etc/apt/sources.list ~/sources.list.backup |
| EOL hirsute mirror | `sudo sed -i 's |
| Focal pin file | /etc/apt/preferences.d/focal → suites focal* at priorities 1001–1003 |
| Retarget sources | Edit sources.list for focal or sudo sed -i 's/hirsute/focal/g' /etc/apt/sources.list |
| Downgrade | sudo aptitude dist-upgrade -y |
| Fix dpkg | sudo DEBIAN_FRONTEND=noninteractive dpkg --force-confdef --force-confold --configure -a |
| Force release flip | sudo apt-get install -y --allow-downgrades libc6 base-files ubuntu-minimal |
| Reboot | sudo reboot then uname -r |
| Fix GRUB | sudo apt install --reinstall grub-common grub2-common grub-pc-bin |
| Clean up | apt list '?obsolete' then sudo apt autoremove --purge |
Downgrade path at a glance
| Phase | What happens |
|---|---|
| Prepare on 21.04 | Point hirsute mirrors at old-releases if needed; patch packages |
| Back up and retarget | Save sources.list; switch suites to focal; add pin file |
| Downgrade | aptitude dist-upgrade (repeat until quiescent) |
| Recover | dpkg --configure -a, --force-overwrite, or focal libc6/base-files if stuck |
| Reboot | Load focal kernel; fix GRUB if scripts are missing |
| Verify | os-release, dpkg --audit, obsolete package list |
Prerequisites
- Ubuntu 21.04 with sudo or root on a console that will not drop during a long
aptituderun. - Working network access to Ubuntu mirrors—today both hirsute and focal often live on old-releases.ubuntu.com.
aptitude(install during the downgrade if missing).- A rollback plan—hypervisor snapshot, LVM snapshot, or fsarchiver archive (see next section).
Backup and rollback options
apt pinning rewrites system packages; it does not delete /home, but a failed boot loader or C library can lock you out. Pick at least one rollback path before you change sources.list:
| Method | Best for | Guide |
|---|---|---|
| Hypervisor snapshot | VirtualBox, VMware, Proxmox guests | Snapshot before editing apt sources |
If partition layout might change, save the partition table with backup and restore the partition table in Linux.
Pre-downgrade checks
Run these before you retarget apt. They give you a baseline for version, kernel, disk space, and broken packages.
Check mount-point usage and filesystem types with df; the df and du covers -h, -T, and filtering pseudo-filesystems.
Use cat /etc/os-release to confirm the target release before editing apt sources; see check Ubuntu version for other version checks.
cat /etc/os-release
uname -r
df -h /
dpkg --audit
sudo cp /etc/apt/sources.list ~/sources.list.backupExample starting point from the lab host:
PRETTY_NAME="Ubuntu 21.04"
VERSION_CODENAME=hirsute
Linux foc-ubuntu21 5.11.0-49-generic ...Point hirsute at old-releases (if apt update fails)
Ubuntu 21.04 is end of life. If apt update cannot reach hirsute on the default archive, switch mirrors first and fully patch the current release:
sudo sed -i 's|//[^/]*archive.ubuntu.com|//old-releases.ubuntu.com|g' /etc/apt/sources.list
sudo sed -i 's|//security.ubuntu.com/ubuntu|//old-releases.ubuntu.com/ubuntu|g' /etc/apt/sources.list
sudo apt update -y
sudo apt upgrade -yAfter this step you are still on 21.04 packages—the downgrade starts when you retarget sources.list to focal.
Step 1 — Back up sources.list
Move the live file aside so you can restore it if the pin or suite edit goes wrong:
sudo mv /etc/apt/sources.list /etc/apt/sources.list-oldStep 2 — Retarget apt to Ubuntu 20.04 LTS (focal)
Create a new /etc/apt/sources.list with focal, focal-updates, focal-security, and focal-backports stanzas. You can paste the full file in an editor:
sudo nano /etc/apt/sources.listExample focal entries (adjust mirror country if you prefer):
deb http://old-releases.ubuntu.com/ubuntu focal main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu focal-security main restricted universe multiverseIf your file still uses hirsute codenames everywhere, a one-line swap works the same way:
sudo sed -i 's/hirsute/focal/g' /etc/apt/sources.listUse old-releases.ubuntu.com for focal if the default archive no longer carries those suites.
Step 3 — Create the focal apt pin file
Files under /etc/apt/preferences.d/ override default apt priorities. Pin focal suites above what is installed so aptitude can downgrade thousands of packages. See the APT preferences manual and apt command in Linux for how priorities interact with apt install specific version pinning.
Create /etc/apt/preferences.d/focal:
Package: *
Pin: release n=focal
Pin-Priority: 1001
Package: *
Pin: release n=focal-updates
Pin-Priority: 1002
Package: *
Pin: release n=focal-security
Pin-Priority: 1003Step 4 — Run aptitude dist-upgrade
Refresh the index, install aptitude if needed, then start the downgrade:
sudo apt update -y
sudo apt install -y aptitude
sudo DEBIAN_FRONTEND=noninteractive aptitude dist-upgrade -yaptitude resolves conflicts differently than apt dist-upgrade and often survives release downgrades when apt’s AutoRemover errors out.
When aptitude stops with broken packages
A desktop downgrade commonly halts with a long “Errors were encountered while processing” list—cups, gdm3, gnome-shell, and related packages on the lab host:
Errors were encountered while processing:
cups-ipp-utils
systemd-sysv
gdm3
gnome-shell
...
Current status: 8 (+8) broken, 47 (-2) upgradable.Repeat the downgrade after each recovery step:
sudo DEBIAN_FRONTEND=noninteractive aptitude dist-upgrade -yFinish configuring half-installed packages without interactive config prompts:
sudo DEBIAN_FRONTEND=noninteractive dpkg --force-confdef --force-confold --configure -a
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-downgrades -f \
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"If apt --fix-broken install alone does not clear the queue, prefer the dpkg --configure -a path first when display manager postinst scripts block the terminal.
File overwrite conflicts
When two packages claim the same path, force the focal .deb from cache (adjust the filename to match your error):
dpkg: error processing archive .../libgamemode0_1.5.1-0ubuntu3.1_amd64.deb (--unpack):
trying to overwrite '/usr/libexec/cpugovctl', which is also in package gamemode-daemonsudo dpkg -i --force-overwrite /var/cache/apt/archives/libgamemode0_1.5.1-0ubuntu3.1_amd64.deb
sudo DEBIAN_FRONTEND=noninteractive aptitude dist-upgrade -yIf /etc/os-release still shows 21.04
When aptitude reports nothing left to change but PRETTY_NAME is still Hirsute, install focal core packages explicitly:
apt-cache policy libc6 base-files ubuntu-minimal
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-downgrades \
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
libc6 base-files ubuntu-minimalapt picks focal candidates when the pin file is in place; use =<version> from apt-cache policy only if apt refuses unpinned installs.
Downgrade complete
Continue until aptitude prints a quiescent summary:
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.Then confirm the release file:
cat /etc/os-releasePRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_CODENAME=focalReboot after the downgrade
Kernel and initramfs updates set /var/run/reboot-required. Reboot so you run a focal kernel that matches the downgraded packages:
cat /var/run/reboot-required || echo "OK — no reboot pending"
sudo reboot
uname -r
ls /boot/vmlinuz-*If the system boots an old hirsute kernel while packages are already focal, set GRUB_DEFAULT to a focal vmlinuz entry or remove obsolete hirsute linux-image-* packages after you confirm a focal kernel is installed.
GRUB scripts missing
If update-grub fails with grub-mkconfig: not found, reinstall GRUB components from focal, then reconfigure:
sudo DEBIAN_FRONTEND=noninteractive apt-get install --reinstall -y \
grub-common grub2-common grub-pc-bin
sudo DEBIAN_FRONTEND=noninteractive dpkg --force-confdef --force-confold --configure -aPost-downgrade verification
cat /etc/os-release
uname -r
dpkg --audit
apt list '?obsolete'dpkg --audit should be empty. Review obsolete packages before bulk purging—see remove obsolete packages on Ubuntu.
Step 5 — Remove unused and obsolete packages
After verification, drop packages that no longer belong on focal:
sudo apt autoremove -yFor a deeper cleanup workflow, see remove unused packages on Ubuntu.
Data on /
The downgrade path above changes packages under /usr and configuration under /etc; it does not remove home directories. Personal files under /home remain on disk when aptitude completes successfully.
You can still lose access to that data if GRUB or libc6 leaves the system unbootable—restore a hypervisor snapshot, LVM snapshot, or fsarchiver archive instead of continuing on a broken hybrid system.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
apt update 404 on hirsute |
Release EOL on main archive | Point sources.list at old-releases.ubuntu.com |
AutoRemover broke stuff |
apt dist-upgrade on a downgrade | Use aptitude dist-upgrade |
| Long broken-package list (cups, gdm3) | Half-configured desktop stack | dpkg --configure -a, apt -f install --allow-downgrades, repeat aptitude |
trying to overwrite during unpack |
Two packages own the same file | dpkg -i --force-overwrite on the focal .deb, retry aptitude |
os-release still 21.04 |
base-files not downgraded |
Install focal libc6, base-files, ubuntu-minimal with --allow-downgrades |
| Boots old hirsute kernel on focal packages | GRUB default unchanged | Reboot, pick focal kernel, adjust GRUB_DEFAULT or purge old linux-image-* |
grub-mkconfig: not found |
GRUB packages broken mid-downgrade | Reinstall grub-common grub2-common grub-pc-bin |
Many obsolete packages |
Older release kernels/meta left behind | apt list '?obsolete'; purge carefully |
Summary
Downgrading Ubuntu 21.04 to 20.04 LTS means retargeting sources.list to focal, pinning focal suites in /etc/apt/preferences.d/, and running aptitude dist-upgrade until the solver quiesces. Expect interruptions—desktop dependencies, overwrite conflicts, and stuck os-release are normal; repeat aptitude after dpkg --configure -a or targeted --force-overwrite installs.
Reboot into a focal kernel, verify with dpkg --audit, and clean obsolete packages. Files under /home stay on disk when the hop succeeds; snapshot restore remains the safest rollback if GRUB or libc configuration fails.
References
- APT preferences manual (Ubuntu 20.04)
- How to roll back Ubuntu to a previous version? (Ask Ubuntu)
- dpkg: error processing during downgrade (Ask Ubuntu)

