In Linux we trust!

APT: install another version of package

APT can provide several versions of a package. How to install a custom version, if suggested by apt version doesn't work for you.

First of all, let's list all possible versions for a package (took ghostscript as example):

# apt-cache showpkg ghostscript
Package: ghostscript
  MD5: 3b69f5ec8191e8f0d88dd3e30e7b1b69
  MD5: 3b69f5ec8191e8f0d88dd3e30e7b1b69

I simplified the output, but main idea you see, it's list of possible versions. Let's install 9.10:

# apt-get install ghostscript=9.10~dfsg-0ubuntu10
The following packages have unmet dependencies:
  ghostscript : Depends: libgs9 (= 9.10~dfsg-0ubuntu10)
E: Unable to correct problems, you have held broken packages.
# apt-get install libgs9=9.10~dfsg-0ubuntu10 ghostscript=9.10~dfsg-0ubuntu10

In some cases you had to purge ex-version of package. Good luck!