On Mon, Apr 13, 2015 at 4:07 PM, Vivekanand Joshi < vjoshi(at)zetainteractive(dot)com> wrote:
> I installed postgres from postgresql-9.4.1-1-linux-x64.run file. > > I want to remove postgres completely from my system. I deleted the data > directory file. > > > Now When I am installing it again, I am getting the below output : > > > > ---------------------------------------------------------------------------- > Welcome to the PostgreSQL Setup Wizard. > > > ---------------------------------------------------------------------------- > Existing installation > > An existing PostgreSQL installation has been found at /home/postgres9.4.1. > This > installation will be upgraded. > > In order to upgrade, we may need to restart the server. All connections to > the > server will need to be reestablished after the completion of the > installation > process. > Press [Enter] to continue: > > > ---------------------------------------------------------------------------- > Please select a directory under which to store your data. > > Data Directory []: > > This means postgres is not completely removed. How to remove it completely > because I need a fresh installation. > > > I uninstalled PostgreSQL by following : > > [root(at)ZetaSearch02 postgres9.4.1]# ./uninstall-postgresql > Do you want to uninstall PostgreSQL and all of its modules? [Y/n]: Y > > > ---------------------------------------------------------------------------- > Uninstall Status > > Uninstalling PostgreSQL > 0% ______________ 50% ______________ 100% > ########################################Warning: The data directory > (/root/postgres/data) and service user account > (postgres) have not been removed. > Press [Enter] to continue: > # > > Info: Uninstallation completed > Press [Enter] to continue: > > > ---------- > > Now when I run the file again it is giving me the same output: > > ./postgresql-9.4.1-1-linux-x64.run > > ---------------------------------------------------------------------------- > Welcome to the PostgreSQL Setup Wizard. > > > ---------------------------------------------------------------------------- > Existing installation > > An existing PostgreSQL installation has been found at /home/postgres9.4.1. > This > installation will be upgraded. > > In order to upgrade, we may need to restart the server. All connections to > the > server will need to be reestablished after the completion of the > installation > process. > Press [Enter] to continue: > [root(at)ZetaSearch02 postgres]# > [root(at)ZetaSearch02 postgres]# > [root(at)ZetaSearch02 postgres]# cd /home/postgres9.4.1 > -bash: cd: /home/postgres9.4.1: No such file or directory > > > Please let me know what to do? > > > > Warm Regards, > > Vivekanand Joshi > +919654227927 > > [image: Zeta Interactive] > > 185 Madison Ave. New York, NY 10016 > > www.zetainteractive.com > > *Coming together is a beginning. Keeping together is progress. Working > together is** success -- Henry Ford* >
Hi Vivekanand Joshi,
To Uninstall PostgreSQL completely from Linux, You need to remove entries that are stored in following files
I want to remove postgres completely from my system. I deleted the data directory file. Now When I am installing it again, I am getting the below output: - Welcome to the PostgreSQL Setup Wizard. - Existing installation An existing PostgreSQL installation has been found at /home/postgres9.4.1. This installation will be upgraded. When I press connect, the window 'PostgreSQL wasn't able to connect to this database. Please check configuration (or something like this)' appears. So I searched on the internet and found on one of the many support websites the instruction to unistall PostgreSQL, which I did, but apparently the account wasn't fully deleted, so the problem is.
Remove 9.4.1 entries from vi /etc/postgres-reg.ini file.
Remove /var/lib/pgsql
Remove postgresql postgresql-8.4 services in /etc/init.d
After removing these entries try to install PostgreSQL.