christoph ender's

blog

wednesday the 17th of july, 2024

apt hold, skip packages during updates

A few days ago I ran into a bug resulting from a regular update from Grafana's apt repositories. Promtail, which I'm using to import syslogs into Grafana Loki, just broke down.

The workaround for this one was to simply go back from the current version 3.1.0 to the last working version 3.0.0. This can be done using

apt install promtail=3.0.0

In order to keep this version until a fix for the broken 3.1.0 is available, the package in question can be put “on hold”:

apt-mark hold promtail

Now, any apt-related upgrade operation won't touch promtail. In order to get a list of all packets in “hold” state:

apt-mark showhold

Removing the “hold” status is done the following way:

apt-mark unhold promtail