How to lock a package version in apt-get

Derek Broughton derek at pointerstop.ca
Sat Sep 5 19:59:24 UTC 2009


Dotan Cohen wrote:

> I need to keep a specific package at a specific version on one
> machine. I know about Synaptic's "Lock Version" feature, I am looking
> for something similar for apt-get. From googling I see that this is
> called "pinning" however I only find information on how to pin the
> packages of a particular repo, not on a per-package basis. How is this
> done? Thanks.

IF it's pinning, then just use synaptic, and check out the 
/etc/apt/preferences file.  apt-get/aptitude can't do this themselves - you 
have to hand-edit the files

I suspect it isn't actually pinning, it's just the dpkg "hold" option (easy 
to set with "aptitude hold", but with dpkg I believe you have to use 
--set-selections).

Now somewhere, I know there's a way to see that status flag, but darned if I 
can track it down, now...
-- 
derek






More information about the ubuntu-users mailing list