Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there a way in Ubuntu to preclude the updater (apt-get) from removing certain obsolete libraries?. For instance to keep even when it upgrades to libstdc++6. It happened to me recently and another program started complaining it couldn't find the old lib. (Symlinc is an obvous option, but I'd like to now if there's anything "safer".

share|improve this question
up vote 1 down vote accepted
echo 'libstdc++5 hold'|dpkg --set-selections

which will prevent that package from being removed/upgraded

share|improve this answer

libstdc++5 and libstdc++6 are separate packages that don't conflict with one another. You can pin packages to a particular version, but since they're different packages that shouldn't matter in this case.

share|improve this answer

Your Answer


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.