[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian /etc/apt/sources.list



Andrew Small <andrew.small <at> aspectcapital.com> writes:
> How do I get apt-get to ignore updating this package when it is invoked on the
> command line?

I use these 3 shell functions; add them to your ~/.bashrc to use them:

hold() {
    for i in $*; do
	echo "$i hold"
    done | sudo dpkg --set-selections
}

unhold() {
    for i in $*; do
	echo "$i install"
    done | sudo dpkg --set-selections
}

lshold() {
    dpkg -l | grep '^h'
}

Then I can just type "hold gaim" to ensure that apt-get doesn't update the gaim
package, "unhold gaim" to allow it to be updated again, and "lshold" to list
currently held packages.

This way I don't have to use aptitude, or mess about with 'pinning' files.



Reply to: