Thursday, December 28, 2017

apt - How to downgrade to a MUCH older version of a package



The machine I work on in my day job runs Ubuntu 15.10. The software that I write runs on machines that are running 12.04. I know that this difference is not ideal, but that is the way it is at the moment.



Sometimes I want to downgrade a version of a package on my Wily machine to match the version installed on the Precise production machines. I know that if there is a package some-package, that I can run the command sudo apt-get install some-package=version-i-want to get the version that I want. However, if my understanding is correct, this only works if that version exists in the Wily repo, and the versions that were current for Precise probably don't (as well the shouldn't).



My question is, is there a good way to downgrade to a very old version of a package through apt-get? If not is there some other good, repeatable way to do it? I know that there are other solutions that involve using an older version of Ubuntu on my dev machine or in a virtual machine, or using a newer version in production machines, but I am not asking about this kind of solution in the present question. Thanks in advance for any suggestions!



I have found that if I go to http://packages.ubuntu.com/ and add to that url / I can download and install versions of old-package from the repo for old-release.




For example, if I am running Wily, but want to get the version of the python-tz package that is available in the Precise repository, I can go to http://packages.ubuntu.com/precise/python-tz and find it there.



This is the kind of solution I was looking for. However, I am not going to mark this as correct for a while in case there is a better way to do it. Preferably, I would be doing it all from the command line, but this solution will work for me for now. Other suggestions are very welcome!!


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...