Monday, May 27, 2013

Upgrading Debian From Squeeze to Wheezy

Today PHP version 5.4 is needed some how on Debian Squeeze and after a little bit search on web I decided to update whole system to Debian Wheezy. By default, Debian Squeeze come up with PHP 5.3. Also it is possible to work with 5.4 on Squeeze but it needs much more effort to upgrade (I tried to compile PHP and failed). Anyway, Below procedure is successful to upgrade whole new Debian system.

Before starting, take your back-ups and your own risk :)

1. Update your sources list file.
find / -name sources.list
nano /etc/apt/sources.list
deb squeeze main contrib non-free
deb-src squeeze main contrib non-free

deb squeeze/updates main contrib non-free
deb-src squeeze/updates main contrib non-free

# squeeze-updates, previously known as 'volatile'
deb squeeze-updates main contrib non-free
deb-src squeeze-updates main contrib non-free
2. Update and upgrade all installed packages from Squeeze repo.
apt-get update
apt-get upgrade
apt-get dist-upgrade
3. Control the half installed or non-installed packages.
dpkg --audit
dpkg --get-selections | grep hold
This grep must return anything.
apt-get install aptitude
4. Update Squeeze repository to Wheezy again with your sources.list file.
deb wheezy main contrib non-free
deb-src wheezy main contrib non-free
deb wheezy-updates main contrib non-free
deb wheezy/updates main contrib non-free

You can also generate your sources.list via
5. Update your whole system.

This steps are important follow the instructions when the installer on running.
apt-get update
apt-get upgrade
apt-get dist-upgrade
aptitude update
aptitude full-upgrade

No comments:

Post a Comment