Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 755981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:11:34+00:00 2026-05-14T15:11:34+00:00

Somehow I’ve managed to completely bugger the install of postgresql on Ubuntu karmic. I

  • 0

Somehow I’ve managed to completely bugger the install of postgresql on Ubuntu karmic. I want to start over from scratch, but when I “purge” the package with apt-get it still leaves traces behind such that the reinstall configuration doesn’t run properly.

After I’ve done:

apt-get purge postgresql
apt-get install postgresql

It said

Setting up postgresql-8.4 (8.4.3-0ubuntu9.10.1) ...
Configuring already existing cluster (configuration: /etc/postgresql/8.4/main, data: /var/lib/postgresql/8.4/main, owner: 108:112)
Error: move_conffile: required configuration file     /var/lib/postgresql/8.4/main/postgresql.conf does not exist
Error: could not create default cluster. Please create it manually with

  pg_createcluster 8.4 main --start

or a similar command (see 'man pg_createcluster').
update-alternatives: using /usr/share/postgresql/8.4/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode.

Setting up postgresql (8.4.3-0ubuntu9.10.1) ...

I have a “/etc/postgresql” with nothing in it and “/etc/postgresql-common/” has a ‘pg_upgradecluser.d’ directory and root.crt and user_clusters files.

The /etc/passwd has a postgres user; the purge script doesn’t appear to touch it. There’s been a bunch of symptoms which I work through only to expose the next.

Right this second, when I run that command “pg_createcluster…” it complains that ‘/var/lib/postgresql/8.4/main/postgresql.conf does not exist’, so I’ll go find one of those but I’m sure that won’t be the end of it.

Is there not some easy one-liner (or two) which will burn it completely and let me start over?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:11:35+00:00Added an answer on May 14, 2026 at 3:11 pm

    Option A

    If your install isn’t already damaged, you can drop unwanted PostgreSQL servers (“clusters”) using pg_dropcluster. Use that in preference to a full purge and reinstall if you just want to restart with a fresh PostgreSQL instance.

    $ pg_lsclusters
    Ver Cluster Port Status Owner    Data directory              Log file
    11  main    5432 online postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.log
    $ sudo systemctl stop postgresql@11-main
    $ sudo pg_dropcluster --stop 11 main
    $ sudo pg_createcluster --start 11 main
    

    Option B

    If you really need to do a full purge and reinstall, first make sure PostgreSQL isn’t running. ps -C postgres should show no results.

    Now run:

    apt-get --purge remove postgresql\*
    

    to remove everything PostgreSQL from your system. Just purging the postgres package isn’t enough since it’s just an empty meta-package.

    Once all PostgreSQL packages have been removed, run:

    rm -r /etc/postgresql/
    rm -r /etc/postgresql-common/
    rm -r /var/lib/postgresql/
    userdel -r postgres
    groupdel postgres
    

    You should now be able to:

    apt-get install postgresql
    

    or for a complete install:

    apt-get install postgresql-8.4 postgresql-contrib-8.4 postgresql-doc-8.4
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hello i need somehow to get top Regional interest and interest over time from
I've somehow managed to completely lock myself out of MySQL on WAMP. It seems
I've somehow managed to get an SVN repository into a bad state. I've moved
can i somehow compare two numbers in regex? i want regex that is correct
somehow I get never any results when I call: select * from table_1 t1
Say the user somehow managed to delete my application’s core data store. (Which has
Somehow the tables don't appear in phpMyAdmin anymore, but we checked the MySQL data
Somehow my MainWindow in my qt project has become unlinked from the .ui I
Somehow I managed to get MAC pc OS 10.5.3. I have installed mono, monodevelop
I knew my code was dying somehow because of the other symptoms, but even

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.