LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   How to prevent a package from being removed? (https://www.linuxquestions.org/questions/debian-26/how-to-prevent-a-package-from-being-removed-317923/)

raid517 04-27-2005 10:51 PM

How to prevent a package from being removed?
 
Hi, how do I prevent a package from being removed? I have installed a single package from an unnoficial repository, but every time I do an apt-get dist-upgrade (or apt-get anything for that matter) it gets removed. How do I stop this? How can I tell apt-get and dpkg to ignore it?

GJ

HappyTux 04-27-2005 11:20 PM

Re: How to prevent a package from being removed?
 
Quote:

Originally posted by raid517
Hi, how do I prevent a package from being removed? I have installed a single package from an unnoficial repository, but every time I do an apt-get dist-upgrade (or apt-get anything for that matter) it gets removed. How do I stop this? How can I tell apt-get and dpkg to ignore it?

GJ

Put the package on hold.

Code:

echo "package_name hold" ¦ dpkg --set-selections package_name
Of course changing package_name to the name of the package you want to hold this done as root making sure that you do a dselect update to get the dpkg and apt databases in sync again.

m_yates 04-29-2005 02:12 PM

Happytux, I didn't know about putting a package on hold. Can't you also do it in preferences by setting a pin priority >1000? For example, I use a specific version of wine. In /etc/apt/preferences I have, for example:
Quote:

Package: libwine
Pin: version 0.0.20040615-1
Pin-Priority: 1001
To prevent libwine from being upgraded from version 0.0.20040615-1.

ironwalker 04-29-2005 10:09 PM

I thought putting a pakage on hold prevents it from getting installed...not holding it from being removed.
*heads to man*


All times are GMT -5. The time now is 07:05 AM.