This question already has an answer here:

I'm building my first debian package (django), which needs some dependencies, so I was wondering if it's possible to install a specific package version with apt-get.

For example instead of

pip install gunicorn==19.3.0

apt-get install gunicorn==19.3.0

(which obviously doesn't work, only apt-get install gunicorn works, however then it will install the latest version)

Ultimately, this is supposed into the Depends section of the control file.

Any ideas?

marked as duplicate by Zanna, Fabby, Eric Carvalho, karel, David Foerster Jan 14 '18 at 1: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.

  • You can also use dpkg to install any downloaded version or see here on how to fake a version askubuntu.com/questions/18192/… – mchid May 28 '16 at 1:41
  • 19.3 does not seem to be available through apt-get unless you have a ppa which provides this version. – mchid May 28 '16 at 1:42


man apt-get 

and go down (/) to the install function. This is worth reading.

By the way, did you try the following?

sudo apt-get install gunicorn=19.3.0

(one equal sign, not two)

As the man page states, use this feature with care. I don't know why you'd want an older version of a package on your installation but I'd guess that it would be a lot easier in the long run to change the dependent package to rely on the latest version of a dependency (gunicorn?) and not keep using an older version. Cleaner, IMO.

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