Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using aptitude as package manager in Debian. How to mark the package never to be installed by it? Because from time to time, when I install some gnome utilities etc., systemd package gets installed by dependency and then my log-in manager (slim) does not work and I cannot login to graphical environment.

I know I should always check the list of things that are to be installed, but I sometimes forget. Can I prevent systemd from being installed?

*This won't work, because it only prevents package from upgrading:

sudo echo hold systemd | sudo dpkg --set-selections

share|improve this question
    
You're trying to fix it from the wrong side. If thing X breaks thing Y, look in slim's logs to determine why it fails to start, send a bug report to Debian, and so on. It'll be more helpful to other Debian users who have the same problem than just pretending that the conflict doesn't exist anymore. –  grawity Mar 9 at 14:44

1 Answer 1

You can achieve the desired result by configuring apt-pinning. Edit /etc/apt/preferences (if it is not there, create it) and add the following lines:

Package: <package>
Pin: origin ""
Pin-Priority: -999

This will prevent apt (and thus aptitude) from installing . Please note that apt might refuse to install packages that depend on the blocked package, too. Read more in the man_page man apt-preferences.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.