Solved

Debian /etc/apt/sources.list

Posted on 2006-10-19
5
1,135 Views
Last Modified: 2013-12-16
Hi

I use the command apt-get to keep my system up to date.  The list of repositories I use to get updated
packages is kept in /etc/apt/sources.list.  I already have a particular package installed which I do not want
to update.

How do I get apt-get to ignore updating this package when it is invoked on the command line?
Is it possible to put the package name in the sources.list file etc.  This would be really useful so that if someone
else is managing the system they do not have to be aware that this package should be ignored.

Thanks in Advance
0
Comment
Question by:sma3092
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
dbacalja earned 63 total points
ID: 17775316
Hi,
packages put on 'hold' are not automatically upgraded. To put a package on hold run:

echo "<package> hold" | dpkg --set-selections

See apt and dpkg quick reference for more info --> http://xanana.ucsc.edu/linux/apt-dpkg-ref.html
0
 
LVL 5

Assisted Solution

by:kyle_in_taiwan
kyle_in_taiwan earned 62 total points
ID: 17780551
Unless you're using a system that's so old you can't use it, i'd really urge you to switch to using aptitude.

From the aptitude screen, you'd simply need to highlight the package in question and press "=".  You'll see a lowercase "h" appear next to the entry, and from then on the package won't be updated until you alter the selection.
0
 
LVL 5

Expert Comment

by:kyle_in_taiwan
ID: 17780557
Also, by working that way none of the necessary package dependencies upon which the package is dependent will be altered without you first authorizing the resolution method.  I don't think apt by itself is able to work out the dependencies as cleanly as aptitude, and certainly the display and notification methods it uses are much less transparent.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question