If you have the version number, or the target release, apt-get supports choosing a particular version or target release. More details can be found on manual page of apt-get. It can also be accessed from terminal by typing man apt-get

sudo apt-get install <package-name>=<package-version-number> OR

sudo apt-get -t=<target release> install <package-name>

is the command to be run. This can be used to down-grade a package to a specific version.

Remark that when using a target release (option -t), the release priority must greater than 1000 to allow downgrades (see man 5 apt_preferences) otherwise the currently installed version will be kept.

It has been helpfully pointed out in the comments that

  • apt-cache showpkg <package-name> lists all available versions. (h/t Sparhawk)
  • apt-mark hold <package-name> "holds" the package at the current version, preventing automatic upgrades. (h/t Luís de Sousa )
Answer from Mahesh on askubuntu.com
🌐
ArchWiki
wiki.archlinux.org › title › Downgrading_packages
Downgrading packages - ArchWiki
March 23, 2026 - downgrade — A Bash script to downgrade one (or multiple) packages, by using the pacman cache or the Arch Linux Archive.
Discussions

What is the correct way to downgrade apt package and dependencies? - Unix & Linux Stack Exchange
In practice what you often want ... install But there is one catch: The release must be configured to allow downgrades. This means its preference must be greater than 1000 because otherwise apt will keep the currently installed version. For more details see https://linux-tips.com/... More on unix.stackexchange.com
🌐 unix.stackexchange.com
October 9, 2019
Manually downgrade a package?
Hi, I’m currently fine-tuning my DNF Automatic configuration on my Rocky Linux 8 servers. How can I manually downgrade one or a handful of packages ? Ideally without wrecking my system ? And how would I go about that ? This would allow me to test DNF Automatic without having to wait for new ... More on forums.rockylinux.org
🌐 forums.rockylinux.org
8
0
December 26, 2023
linux - How to downgrade a specfic package using Pacman - Stack Overflow
How is it possible to downgrade a package version using Pacman in Arch distributions? for example, python-flask is version 2. But I need to downgrade it to 1.1.2-4. How Can I do it? More on stackoverflow.com
🌐 stackoverflow.com
Downgrading packages without removing half the OS
Hey ya! Sorry, this is another "I fucked up and need help"-post. I went to backports than sid to try and fix some driver issues. Apparently, I… More on reddit.com
🌐 r/debian
13
2
November 5, 2023
🌐
Red Hat
access.redhat.com › solutions › 29617
How to use yum/dnf to downgrade or rollback some package updates? - Red Hat Customer Portal
May 1, 2025 - In Yum 3.2.22, which come with Red Hat Enterprise Linux 5.4, there is a downgrade option. This will downgrade a package to the previously highest version or you can specify the whole version and release number for the package to downgrade.
🌐
MakeUseOf
makeuseof.com › home › linux › how to downgrade packages on linux
How to Downgrade Packages on Linux
April 12, 2022 - On Debian-based distros, you have the APT package manager, whereas Arch Linux and RHEL-based distros ship with Pacman and RPM, respectively. Downgrading a package on Ubuntu and other Debian-based distros is as easy as the installation process.
Top answer
1 of 4
5

apt refuses to downgrade packages which you already have installed, unless you ask to do it explicitly.

One way to do this, as you found out, is to specify each version manually in the install command. If you want to make sure the dependencies will be removed when pigpio is removed, you can mark them as auto with apt-mark after installation.

An easier way is to uninstall those upgraded packages first:

apt-get remove pigpio
apt-get autoremove
apt-get install pigpio=1.68-3+rpi1

This normally should work, but for some reason it doesn't for pigpio, probably because there's only one package in the default release. What does work with pigpio is the -t release option, and you can find out what release a package belongs to with apt-cache or apt policy:

pi@raspberrypi:~ $ apt-cache madison pigpio
    pigpio | 1.78-1+rpi1 | http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages
    pigpio | 1.68-3+rpi1 | http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages

pi@raspberrypi:~ $ apt policy pigpio
pigpio:
  Installed: (none)
  Candidate: 1.78-1+rpi1
  Version table:
     1.78-1+rpi1 500
        500 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages
     1.68-3+rpi1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages

pi@raspberrypi:~ $ sudo apt-get -t buster install pigpio
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libpigpio-dev libpigpio1 libpigpiod-if-dev libpigpiod-if1 libpigpiod-if2-1 pigpio-tools pigpiod
The following NEW packages will be installed:
  libpigpio-dev libpigpio1 libpigpiod-if-dev libpigpiod-if1 libpigpiod-if2-1 pigpio pigpio-tools pigpiod
0 upgraded, 8 newly installed, 0 to remove and 7 not upgraded.
Need to get 328 kB of archives.
After this operation, 990 kB of additional disk space will be used.

If autoremove doesn't remove all the dependencies, it means that something else in your system is depending on those packages. You'll need to either uninstall that something, or downgrade it along with pigpio. Note that specifying old package versions manually wouldn't work in such a case either.

2 of 4
2

When downgrading dependencies the apt system needs to know to which version each dependency should be downgraded.

In practice what you often want to do is downgrade a package together with its dependencies to a given release using option -t. Thus you will use sudo apt-get -t=<target release> install <package-name>

But there is one catch: The release must be configured to allow downgrades. This means its preference must be greater than 1000 because otherwise apt will keep the currently installed version. For more details see https://linux-tips.com/t/downgrade-a-package-with-its-dependencies/261

🌐
UbuntuPIT
ubuntupit.com › home › tutorials › how to downgrade packages on linux system: the ultimate guide
How To Downgrade Packages On Linux System: The Ultimate Guide
October 25, 2024 - There is an option for downgrading Packages in Linux using the apt command in the terminal. For that, you need to know the version of the desired package. Then we can run the following terminal commands in Linux to downgrade the package.
🌐
GitHub
github.com › archlinux-downgrade › downgrade
GitHub - archlinux-downgrade/downgrade: Downgrade packages in Arch Linux · GitHub
Eases downgrading packages in Arch Linux.
Starred by 745 users
Forked by 34 users
Languages   Shell 95.2% | Just 4.8%
Find elsewhere
🌐
Linux Uprising
linuxuprising.com › 2019 › 02 › how-to-downgrade-packages-to-specific.html
How To Downgrade Packages To A Specific Version With Apt In Debian, Ubuntu Or Linux Mint - Linux Uprising Blog
February 12, 2019 - How To List All Packages In A Repository On Ubuntu, Debian Or Linux Mint [APT] To downgrade a package to a specific version, you'll need to append =version after the package name in the installation command, with version being the version to which you want to downgrade the package:
🌐
It's FOSS
itsfoss.com › downgrade-apt-package
Downgrading a Package via apt-get in Ubuntu and Debian
February 17, 2023 - Yes! That's totally possible. You can downgrade a recently updated package using the apt command in Ubuntu and Debian based distros. Here's how to do that.
🌐
OneUptime
oneuptime.com › home › blog › how to downgrade packages on ubuntu
How to Downgrade Packages on Ubuntu
January 15, 2026 - # Remove specific kernel version sudo apt remove linux-image-5.15.0-92-generic # Clean up sudo apt autoremove ... # Use ppa-purge to downgrade to official version sudo apt install ppa-purge # Purge PPA and downgrade packages sudo ppa-purge ppa:repository/ppa # Example sudo ppa-purge ppa:ondrej/php
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › beginner questions
[solved] downgrade packages - Linux Mint Forums
libxfconf-0-3 4.16.0-2vanir~20.04 xfconf 4.16.0-2vanir~20.04 You can get a current view of that with terminal command: dpkg -l "*xfconf*" Run that command before you open "Software Sources" and do the downgrade, then you can use the up arrow on terminal and just run the same command again after ...
🌐
GreenCloud
green.cloud › home › greencloud documents › linux operating systems › how to downgrade a package via apt-get
How to downgrade a Package via apt-get - GreenCloud Documentation
January 19, 2026 - You can downgrade a recently updated package using the apt command in Ubuntu and Debian-based distros. Here’s how to do that In a situation where a recently upgraded software is causing issues?
🌐
LinuxForDevices
linuxfordevices.com › home › how to downgrade packages in arch based distributions?
How to downgrade packages in Arch based distributions? - LinuxForDevices
May 28, 2023 - Find the package in question and download it. Then edit the `/etc/pacman.conf` file to temporarily include the chosen Arch Linux Archive repository. Finally, update the package with the new mirror and downgrade it.
🌐
Linux Adictos
en.linuxadictos.com › linux addicts › general › linux software › downgrade: revert to a previous version of a software package
How to Downgrade to Revert to a Previous Version of a Package
September 25, 2019 - Sometimes the previous versions of a package can be more stable, work better for some reason, or even that the user likes the version before the update more because it has something that the new one no longer implements. If that's your case, in this tutorial we are going to show you how you can downgrade of any package, that is, roll back an update and get the previous version installed on your system.
🌐
Rocky Linux Forum
forums.rockylinux.org › rocky linux help & support
Manually downgrade a package? - Rocky Linux Help & Support - Rocky Linux Forum
December 26, 2023 - Hi, I’m currently fine-tuning my DNF Automatic configuration on my Rocky Linux 8 servers. How can I manually downgrade one or a handful of packages ? Ideally without wrecking my system ? And how would I go about that ? This would allow me to test DNF Automatic without having to wait for new ...
🌐
Make Tech Easier
maketecheasier.com › home › computing › linux › how to downgrade software/package in linux
How to Downgrade Software/Package in Linux - Make Tech Easier
October 10, 2018 - Sometimes you need to revert or change a software package install in Linux. Learn how you can downgrade software for several major distributions in Linux.
🌐
It's FOSS
itsfoss.com › downgrade-flatpak-packages
How to Downgrade Flatpak Packages in Linux
October 25, 2024 - Here, I am going to downgrade the Black Box, so my application ID will be com.raggesilver.BlackBox. Once you get the application ID, you’d need to list the previous releases. You can easily do this by following the given command syntax: flatpak remote-info --log flathub <Application ID> Once you find the preferred previous release, copy the commit code as shown above. Once you follow the first two steps, you should have the following: Application ID of the package.
🌐
Itsubuntu
itsubuntu.com › downgrade-packages-on-linux
Downgrade Packages On Linux System: Linux Guide 2022 | Technology News Information & Jobs
April 16, 2022 - Now, select the Package which you want to downgrade, and from the drop-down menu (Package) select Force version. You can see the available version so that you can downgrade your package to an earlier version.
🌐
How-To Geek
howtogeek.com › home › linux & macos terminal › how to downgrade packages on ubuntu
How to Downgrade Packages on Ubuntu
July 2, 2012 - Click the Apply button to apply your changes and install the older version of the package, assuming everything works properly. After you downgrade the package, select it and use the Package –> Lock Version option.