LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-30-2006, 02:05 PM   #1
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Rep: Reputation: 15
Prevent apt-get from upgrading a package


I'm running into an annoying situation that is rendering apt-get update almost unuseable. I have several packages that I installed from and want to maintain from source, but every time I apt-get update it tries to update them, which then either screws up the version, installs an unwanted package, or installs it twice.

Two for example:

Exim4. I'm running courier-imap and qmail, but apt wants to install exim4 which obviously isn't appreciated.

Clamav. I maintain clam via source and don't want it installed by apt, yet it insists on including it in the packages to be upgraded.

If anyone can tell me on how to prevent apt from checking and upgrading specific packages I'd sure appreciate it.
 
Old 05-30-2006, 02:29 PM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
The easiest way IMHO is using Synaptic. When the upgradeable packages are selected, you unselect the unwanted upgrades. Not sure it'll work, never tried it...
 
Old 05-30-2006, 02:49 PM   #3
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,883
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
Lock the package either by using "pinning" or simply by selecting it in Synaptic>Package>Lock version.
 
Old 05-30-2006, 03:53 PM   #4
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by craigevil
Lock the package either by using "pinning" or simply by selecting it in Synaptic>Package>Lock version.
I was under the impression that Synaptic is a GUI package manager. If that's the case it won't help me, as this is a command line server and doesn't have any X installed.

Any example of pinning?
 
Old 05-30-2006, 04:28 PM   #5
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,883
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
Apt-Pinning for Beginners
http://jaqque.sbih.org/kplug/apt-pinning.html

Using APT with more than 2 sources
http://www.argon.org/~roderick/apt-pinning.html

Pin the package similiarly to:
Package: libasound2
Pin: version 1.0.11-4
Pin-Priority: 1001
 
Old 05-31-2006, 12:04 PM   #6
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by craigevil
Apt-Pinning for Beginners
http://jaqque.sbih.org/kplug/apt-pinning.html

Using APT with more than 2 sources
http://www.argon.org/~roderick/apt-pinning.html

Pin the package similiarly to:
Package: libasound2
Pin: version 1.0.11-4
Pin-Priority: 1001
Thanks much, took some fooling around with, but that's exactly what I was looking for!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
latex2e package unavailable in package manager or apt-get cesine Debian 2 07-11-2006 02:31 PM
prevent a package from upgrade kushalkoolwal Debian 2 04-17-2006 08:16 PM
How to prevent a package from being removed? raid517 Debian 3 04-29-2005 10:09 PM
How to prevent the UDP package from being thrown away? fionafhx Linux - Networking 0 12-24-2004 01:49 PM
Does apt-get install <package> upgrade the package if it is already installed? davidas Debian 4 04-05-2004 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration