Translate this page :

*Install old packages with Debian Snapshot *

:: is a wayback machine that allows access to old packages based on dates and version numbers. It consists of all past and current packages the Debian archive provides. I found out about this service when a customer needed to use an older version of PHP, and I couldn't find a way to cleanly do this. Thanks to Debian Snapshot, it's now done & running.

I began by finding out the exact version of PHP and Apache packages that needs to be installed.

The client asked for PHP version 5.3, so I browsed to

Found that the most up to date version is 5.3.10-2,
so I browsed to its folder :

It shows date & time of 2012-02-21 04:16:01
so I added the following line to /etc/apt/sources.list :

# PHP 5.3.10-2 packages
deb unstable main

Note the date & time format on that line.

Now we need to install Apache version 2.22.2-1 – why this particular version?
Answer: because this is the version required by PHP 5.3.10-2 package; it will complain if any other version are installed. So yeah that's pretty easy to figure out 🙂

Using similar technique, I found out the line for Apache2 packages :

# Apache 2.22.2-1 packages
deb unstable main

Now let's do the installation process itself :

# remove current PHP packages
sudo apt-get remove –purge `dpkg -l | grep php | grep -w 5.5 | awk '{print $2}' | xargs`
# remove current Apache packages
sudo apt-get remove –purge `dpkg -l | grep apache | grep -w 2 | awk '{print $2}' | xargs`

# update package database
apt-get update

# this is the setting required to be able to use Debian Snapshot
apt-get -o Acquire::Check-Valid-Until=false update

# now we can specify the exact version
apt-get install php5=5.3.10-2 libapache2-mod-php5=5.3.10-2 php5-cli=5.3.10-2 php5-common=5.3.10-2 php5-gd=5.3.10-2 php5-mcrypt=5.3.10-2 php5-mysql=5.3.10-2 php5-pgsql=5.3.10-2 apache2=2.2.22-1 apache2-mpm-prefork=2.2.22-1 apache2-suexec=2.2.22-1 apache2-utils=2.2.22-1 apache2.2-common=2.2.22-1 apache2.2-bin=2.2.22-1

/etc/init.d/apache2 restart

If the commands does not work, maybe it's formatting problem – you can refer instead to my Pastebin here :

Hope you find these useful (y)

Post imported by Google+Blog for WordPress.

7 Responses to “*Install old packages with Debian Snapshot *

Leave a Reply


Subscribe without commenting


SEObox: Web Hosting Murah Unlimited Komik Indonesia Homeschooling Indonesia