Ubuntu – Install a specific package version

32-bit64-bitaptpackage-management

I need to install a tofrodos 1.17.3 for i386. I'm running Ubuntu 16.04.2 and I know that if I run sudo apt-get install tofrodos:i386 it will install version 1.17.3. However this will be in a script which possibly will be used much later and I need to fix the version, 1.17.3 and the 32 bit architecture, i386. Does anyone know how to do that?

I've already tried

sudo apt-get install tofrodos=1.17.3:i386
sudo apt-get install tofrodos:i386=1.17.3

and none of them worked.

Any help is appreciated.

Best Answer

Nobody can guarantee that the package in the repository will be a fixed version.

It is possible to hold an installed package from upgrading, but apt will always install an available version from the repos. Nobody keeps old versions there.

There actually may be two versions the initial one and an "upgrade" one.

But it is very unlikely that a package will be upgraded to some new major version in an LTS repository. Some minor fix may be released, but I don't think it can affect functionality.

The

sudo apt-get install tofrodos:i386=version

is the correct command. But there is no 1.17.3 version in the repos.

The correct version is 1.7.13+ds-2ubuntu1.

pilot6@Pilot6:~$apt-cache policy tofrodos
tofrodos:
  Installed: (none)
  Candidate: 1.7.13+ds-2ubuntu1
  Version table:
     1.7.13+ds-2ubuntu1 500
        500 http://ru.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

So the

sudo apt-get install tofrodos:i386=1.7.13+ds-2ubuntu1

should work.

It is the "initial" version for xenial. Even if the package is upgraded in xenial-updates the command will install this version.

Related Question