Home » Questions » Computers [ Ask a new question ]

How do I block a deb file from being installed as the result of a dependency?

How do I block a deb file from being installed as the result of a dependency?

I'm running the latest version of Ubuntu 09.10 (syphyllitic sphinx or whatever the heck the codename is) and I'm trying to figure out how to block a package from installing as the result of a dependency. For this example, let's say that I would like to make it so bc is never installed, even though ubuntu-desktop claims to require it. Is there an easy way to make it so when I do an update and there is a new version of ubuntu-desktop it will never again try to install bc?

Asked by: Guest | Views: 329
Total answers/comments: 1
bert [Entry]

"i don’t know if it works for mandatory requirements, but it did a good job for me blocking the recommended package ttf-mscorefonts-installer when installing/upgrading wine.

i figured this package just exists to make the internet look crappy in order to keep young linux hackers from posing a threat to MS there.

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."