Debian Admin - Your way to Debian World

June 12, 2008

How to prevent a package from being updated in Debian

by @ 7:58 pm. Filed under Package Mgmt

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

If you want to update all the packages other than one in your debian server follow this procedure

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

Using dpkg

Put a package on hold

echo “package hold” | dpkg --set-selections

Example

echo “apache2 hold” | dpkg --set-selections

Remove the hold

echo “package install” | dpkg --set-selections

Example

echo “apache2 install” | dpkg --set-selections

Knowing the status of your packages

dpkg --set-selections

Using aptitude

With aptitude, you can hold a package using

#aptitude hold package_name

Example

#aptitude hold apache2

and remove the hold with

aptitude unhold package_name

Example

#aptitude unhold apache2

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 the `=’ key (or `H’). The changes will go live immediately after you exit the [S]elect screen.

Tags: , , ,

You may also be interested in...

One Response to “How to prevent a package from being updated in Debian”

  1. Name Says:

    What about apt-pinning? I are satisfied wit this method…

Leave a Reply

Subscribe RSS Feed

subscribe to the Debian Admin RSS feed

Internal links:

Sponsors:



Categories:

Support Debian Admin

Amount $:
Website(Optional):

Sponsors:

Archives:

Related Links:


Favourite Sites:

Wordpress Collection
Windows Reference
Ubuntu Geek
DebianHelp
All About Debian Tutorials
Power Electrical
Check Your IP Here
Debian,Ubuntu News
DebCentral
Tuxmachines
Capnkirby
Libervis
Nuxifield
Linux Horizon
Linux Appfinder
Debuntu
GNU/Linux For Everyone
Free Penguin
DebianAdmin is not related to the Debian Project.
This site is copyright © 2006,2007 Debian Admin
All Trademarks are the property of their respective owners.
The contents of this website may not be mirrored or archived without the express written permission of DebianAdmin Site Owner.

DISCLAIMER: All the information, troubleshooting methods, utilities offered in this website is provided AS-IS, without any warranties. Though I strive for perfection, and always test the validity and effectiveness of the troubleshooting content in various systems, I assume no responsibility for your use of these Fixes, Utilities and other troubleshooting advice. The author will not be liable for any special, incidental, consequential or indirect damages due to loss of data or any other reason. All use is completely at your own risk. Changes to the existing content and new additions are made to this website periodically, without notification.
Rodney's Kontera DynamiContext Plugin plugged in.