Question: Because of I'd
like to prevent apt-get upgrade and Update Manager from updating the
"libgtk2.0-0" package.
How can this be achieved?
Solutions Sample (Please watch the whole video to see all solutions, in order of how many people found them helpful):
== This solution helped 16 people ==
Preventing a package from being installed is called "package holding" and it is
very simple to do:
echo package_name hold | dpkg --set-selections
...where *package_name* is the name of the package you want to prevent from
installation.
Note: the above command assumes root privileges. In other words, you will
probably need to type sudo su before running it.
== This solution helped 19 people ==
Install synaptic using sudo apt-get install synaptic.
Run using gksudo synaptic and on the search box locate the package you want to
lock, ie: gedit
[enter image description here]
From the package menu select Lock version:
[enter image description here]
And that is all, the version currently installed at the time of the lock will
stay installed even during upgrades.
== This solution helped 1 person ==
You can use on aptitude the "specific override", like this:
aptitude reinstall ~i oracle-java8-jre:
This is a one time only use of (not stored for future reinstalls), keep
specific override, to reinstall all packages in your system but not oracle-
java8-jre.
If you use a keep specific override, the package will momentarily be in a state
of keep an aptitude will not try to install it.
A very good thing if you think your system was compromised some how.
== This solution helped 1 person ==
If you have Synaptic installed you can select the package and use the menu
Package -> Lock Version to prevent it being updated.
You can install Synaptic with sudo apt-get install synaptic. I personally find
it more useful than the Software Center... then again, I'm fairly old school. :
)
== This solution helped 31 people ==
I was looking for the same thing and after a lot of research I found that using
the following syntax you can forbid one specific version but allow the next
update:
Package: compiz-plugins-main
Pin: version 1:0.9.7.0~bzr19-0ubuntu10.1
Pin-Priority: -1
This goes into the /etc/apt/preferences file.
== This solution helped 3 people ==
Everything you ever wanted to know about "holding" and "pinning" packages to
specific versions:
== This solution helped 3 people ==
See bugs #158981
and #72806.
The summary is that hold at apt-get / aptitude level is not triggering hold
status in dpkg (see bug 72806 especially) and update-manager reads status from
dpkg.
workaround is run as root: echo "package hold" | dpkg --set-selections
== This solution helped 43 people ==
To put a package "foo" on hold:
echo "foo hold" | dpkg --set-selections
In your case we are going to put wine on hold:
sudo -i
echo "wine hold" | dpkg --set-selections
To remove the hold:
sudo -i
echo "wine install" | dpkg --set-selections
With thanks & praise to God! With thanks to all the many who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music & music license: | Images & images license: and others | With thanks to user soger ( user rubo77 ( user RobotHumans ( user Panther ( user notpeter ( user Nathan Osman ( user muru ( user Jeff Ferland ( user jasper ( user Ivan ( user hhlp ( user dinchamion ( user David Oliver ( user cabonamigo ( user Bruno Pereira ( user Braiam ( user Allan ( and the Stack Exchange Network ( Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything should be amiss at Roel D.OT VandePaar A.T gmail.com.
0 Comments