0

How can I, for always, block the installation of a package? (in this case: network-manager)

I previously did

echo network-manager hold | dpkg --set-selections

After some update I found that it was installed again. How Can I get it to stay blocked?

Nanne
  • 8,625
user40404
  • 306
  • 1
  • 3
  • 8
  • Just some advice: lay of the CAPS and the bold an the exlamation points. Just ask your question. – Nanne Jun 12 '13 at 11:30
  • thanks for advice, but i'm REALLY PISSED OFF, and already i'm tring hard not to say something really bad about that package and don't get the subject changed to what it does good or bad, i just want to never see it again in my system instead of trying to fix it every time ... also thanks for editing, and i hope i get an answer :) – user40404 Jun 12 '13 at 11:35

2 Answers2

0

First, take a look at this question

It has a highly upvoted answer supposing to do what you want. I'd not consider it a duplicate (it is about not updating), but nevertheless you should check out that answer. Did you uninstall etc beforehand? These commands will probably not remove a current installation. Did you check if it is removed after uninstalling (some leftover files could make it look like your package is still there)? After that, be sure to run those commands with SUDO.

The dpkg solution should work.

If that doens't work, there are some other methods as well. For instance from this question on superuser

put the following into your /etc/apt/preferences:

Package: i-am-a-package-containing-junk
Pin: version *
Pin-Priority: -1

the Pin-Priority: -1 says that the matched versions of the matched packages should never be installed, while the rest matches every version of the package i-am-a-package-containing-junk, effectively preventing its installation.

Finally, you might take a look on this page: it shows you the file /etc/apt/apt.conf.d/01autoremove, and how to use it.

Nanne
  • 8,625
  • thank you, that did the trick, now even if i try to install it (apt-get install network-manager) i cannot, really thank you :) – user40404 Jun 12 '13 at 12:12
0

From the man pages about the --set-selection option:

Note that this will not actually install or remove anything, but just set the selection state on the requested packages. You will need some other application to actually download and install the requested packages. For example, run apt-get dselect-upgrade.

Also, have you tried unistalling it with apt-get ?

sudo apt-get remove network-manager
Dan
  • 13,119