Introduction

In case you need to keep an outdated version of any deb package for whatever reason, there are different ways to maintain it on Debian-derived distributions on Linux.

We are going to use the dpkg command to perform the following operations although others such as apt or dselect can be used.

On hold

Put a package on hold.

# echo "<package-name> hold" | dkpg --set-selections

After this operation, this package remains with the current version even if new versions are available.

Remove hold

# echo "<package-name> install" | dpkg --set-selections

After this operation, the package will be updated as any other in the list.

Show the status

  1. of all your packages.
# dpkg --get-selections
# dpkg --get-selections | more
7zip                                            install
accountsservice                                 install
acl                                             install
adduser                                         install
adwaita-icon-theme                              install
aglfn                                           install
alsa-topology-conf                              install
alsa-ucm-conf                                   install
alsa-utils                                      install
...
  1. of a single package
# dpkg --get-selections <package-name>
# dpkg --get-selections zip
zip                                             install

Show packages on hold

# dpkg --get-selections | grep "\<hold$"
# dpkg --get-selections | grep "\<hold$"
lifeograph                                      hold