Install old versions of software on Debian like PHP 5.3

I wouldn’t recommend going backwards on PHP versions but if you have no other choice then simply add a Debian snapshot to your repo and then install passing the version number.

You can find all the information you need here: http://snapshot.debian.org

But if you’re lazy (like me) just copy and paste the following:

Add the source lists:

deb http://snapshot.debian.org/archive/debian/20120221T041601Z/ unstable main
deb-src http://snapshot.debian.org/archive/debian/20120221T041601Z/ unstable main

Now update apt but ignore expiry dates:

apt-get -o Acquire::Check-Valid-Until=false update
Now you can pass in the version number you need 5.3.10-2 in this case
apt-get install php5=5.3.10-2

A bit more info if you was wondering on how I got to this, if you find the package you need on a snapshot in this case here: http://snapshot.debian.org/package/php5/5.3.10-2/ it gives you the date it was first added 2012-02-21 04:16:01 so then you simply add this into the snapshot source list like so:

http://snapshot.debian.org/archive/debian/yyyymmddThhmmssZ
In the case above this translates to:

deb http://snapshot.debian.org/archive/debian/20120221T041601Z/

Leave a Reply

Your email address will not be published. Required fields are marked *