Trouble with package management after using apt-mark

Tom H tomh0665 at gmail.com
Sun Sep 6 13:21:48 UTC 2015


On Sat, Sep 5, 2015 at 11:00 AM,  <silver.bullet at zoho.com> wrote:
>
> Another issue is, that synaptic doesn't care about packages hold by
> apt-mark, it still will upgrade linux, when the grub packages are hold,
> but also install the hold grub packages.

"apt-mark hold" and "dpkg --set-selections" are interchangeable
because they write holds to "/var/lib/dpkg/status":

# apt-mark hold google-chrome-stable

# apt-mark showhold
google-chrome-stable

# dpkg --get-selections | grep hold
google-chrome-stable hold

# grep -A1 google-chrome-stable /var/lib/dpkg/status
Package: google-chrome-stable
Status: hold ok installed

# echo "google-chrome-stable install" | dpkg --set-selections

# apt-mark showhold

# grep -A1 google-chrome-stable /var/lib/dpkg/status
Package: google-chrome-stable
Status: install ok installed


I don't have synaptic installed but IIRC it writes holds to
"/var/lib/synaptic/preferences", which has a format similar to pins in
"/etc/apt/preferences.d/" whereby it pins a package to 1001.

(Plus: I don't have aptitude installed but IIRC it writes holds to
"/var/lib/aptitude/pkgstates", which has a format similar to
"/var/lib/dpkg/status".)



More information about the ubuntu-users mailing list