How can i be able to delete data from my localhost so that i can be able to view my current data

how do i delete information from my localhost to be able to input new data

Hi @Edwin,
Welcome to the CHT community!
If you are looking to delete the default reference application and upload a blank project in local environment, then you can run following:

  • First create your project directory and initialize it by running cht initialise-project-layout (For more info refer here)

  • Next to upload your blank project above, you can run:
    cht --url=https://medic:password@localhost --accept-self-signed-certs
    (For details refer here)

1 Like

Thank you @niraj But I did that and my old information that i tested in the localhost is still showing yet i want to erase all of it and see the current data only

So, there is not really an automated process for erasing all the existing data and starting over. However, there are a couple ways to do it manually depending on how you deployed your CHT instance. If you have deployed using the docker-compose files, then all your Couch data should be getting stored in ~/cht-4-app-developer/couchd (or wherever you specified via the COUCHDB_DATA envar). You should be able to clear all the data by:

  • Remove the CHT instance containers (via docker-compose down)
  • Delete the ~/cht-4-app-developer/couchd directory
  • Restart the CHT instance (via docker-compose up)

When the CHT instance restarts, it should bootstrap the fresh Couch instance just like it did the first time.

If you are using the Docker Helper, then really the easiest thing to do is just destroy your current instance and spin up a new one.


If you don’t want to blow away everything from your test instance (e.g. you want to keep your current users/contacts/etc) but you want to clean up reports/patients, you can have a look at cht-data-helper.

1 Like

thank you @jkuester really helpful

1 Like

@Edwin - The above info from @jkuester is accurate and great advice. For a bit more info and some manual steps that you can take, check out this post from about a year ago on the same topic.

2 Likes