how to install a specific package version

27,210

Execute

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.

Share:
27,210

Related videos on Youtube

Paul Bernhard Wagner
Author by

Paul Bernhard Wagner

Noobie, very newwww

Updated on September 18, 2022

Comments

  • Paul Bernhard Wagner
    Paul Bernhard Wagner over 1 year

    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?

    • mchid
      mchid almost 8 years
      You can also use dpkg to install any downloaded version or see here on how to fake a version askubuntu.com/questions/18192/…
    • mchid
      mchid almost 8 years
      19.3 does not seem to be available through apt-get unless you have a ppa which provides this version.