Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Possible Duplicate:
How to prevent updating of a specific package?
Keep the Ubuntu package version I'm using now

Is it possible to upgrade all packages except a given package? Is there something like apt-get upgrade --exclude package_to_exclude?

share|improve this question

marked as duplicate by bodhi.zazen, Uri Herrera, jokerdino, Jjed, fossfreedom Jan 30 '12 at 7:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Actually you can do this with several methods, see the link I gave you above. – bodhi.zazen Jan 30 '12 at 4:09
up vote 52 down vote accepted

In short: sudo apt-mark hold <package>


echo <package> hold | sudo dpkg --set-selections
share|improve this answer
I get the following error: Usage: apt-mark [options] {markauto|unmarkauto} packages... apt-mark: error: first argument must be 'markauto', 'unmarkauto' or 'showauto' – Olivier Lalonde Jan 30 '12 at 4:25
Strange. It works for me. Just tried it using sudo apt-mark hold unity-greeter – Zoke Jan 30 '12 at 4:28
I think this error has to do with the Ubuntu version. Versions prior to 12.04 don't support apt-mark hold – user733211 Jun 7 '13 at 10:48
Once the package should be updated again, use the unhold parameter. – greenrobot Nov 5 '14 at 5:57

Check out "Introduction to Holding Packages" in the Ubuntu's Pinning Howto

share|improve this answer
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – kraxor Aug 13 '14 at 19:02

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