Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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, Jacob Johan Edwards, 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

2 Answers 2

up vote 25 down vote accepted

In short: sudo apt-mark hold <package>

or

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

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

share|improve this answer
1  
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 at 19:02

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