Steps that worked for me Ubuntu 8.04.2
on to removepostgres 8.3
List all Postgres Related packages
dpkg-l | grep postgresii PostgreSQL 8.3.17-0ubuntu0.8.04.1 Object-relati Onal SQL Database (latest VERSIII postgresql-8.3 8.3.9-0ubuntu8.04 Object-relationa L SQL Database, version 8.3ii postgresql-client 8.3.9-0ubuntu8.04 front-end programs F or PostgreSQL (latest Veii postgresql-client-8.3 8.3.9-0ubuntu8.04 front-end programs for PostgreSQL 8.3ii Postgresql-client-common 87UBUNTU2 Manager for multiple PostgreSQL C Lient versiii postgresql-common 87ubuntu2 PostgreSQL database-cluster manageri I postgresql-contrib 8.3.9-0ubuntu8.04 additional facilities for PostgreSQL (latestii postgresql-contrib-8.3 8.3.9-0ubuntu8.04 additional facilities for PostgreSQL
Remove all above listed
sudo apt-get --purge remove postgresql postgresql-8.3 postgresql-client postgresql-client-8.3 postgresql-client-common postgresql-common postgresql-contrib postgresql-contrib-8.3
Remove the following folders
sudo rm -rf /var/lib/postgresql/sudo rm -rf /var/log/postgresql/sudo rm -rf /etc/postgresql/
Ubuntu Uninstall Postgres