Because of bug #693758 I'd like to prevent apt-get upgrade and Update Manager from updating the "libgtk2.0-0" package.

How can this be achieved?

link|improve this question

56% accept rate
feedback

3 Answers

up vote 20 down vote accepted

Now go to Synaptic Package Manager (System > Administration > Synaptic Package Manager)

Click search button and type package name.

When you find package select it and go to Package (in menu) and click Lock Version.

Synaptic menu

and you are done, now that package will not show in update manager and it will not be updated.

There are three ways of holding back packages, with dpkg, aptitude or with dselect.

Using dpkg

Put a package on hold

echo "package hold" | sudo dpkg --set-selections

Remove the hold

echo "package install" | sudo dpkg --set-selections

Displaying the status of your packages

dpkg --get-selections

Displaying the status of a single package

dpkg --get-selections | grep "package"

Using aptitude

you can hold a package using

sudo aptitude hold package_name

and remove the hold with

sudo aptitude unhold package_name

Using dselect

With dselect, you just have to enter the [S]elect screen, find the package you wish to hold in its present state, and press = or H. The changes will go live immediately after you exit the [S]elect screen.

link|improve this answer
1  
This also works to prevent a package from being installed. When installing devscripts, a lot packaged are pulled as Recommended packages. As I don't need a mailserver (postfix), I could disable the installation of it by running echo postfix hold | sudo dpkg --set-selections before running sudo apt-get install devscripts. This hold action persists only for this installation, after the installation the selections are reset. – Lekensteyn Aug 20 '11 at 10:47
feedback

I synaptic you can freeze the version of a specific package I'm not a 100% sure as to whether this will amend apt-get but it will definately stop update manager.

To freeze a package select it in synaptic then open the package menu and select freeze version.

Hope this helps

edit: This question 16668 deals with a similar situation

link|improve this answer
feedback

Everything you ever wanted to know about "holding" and "pinning" packages to specific versions: https://help.ubuntu.com/community/PinningHowto

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.