sudo apt-get --purge remove postgresql-8.2
If you need Ubuntu to recreate an init.d script, use --purge remove then reinstall.