Mohsen
Mohsen

Reputation: 4266

Couchdb purge whole database

I'm quite sure that I want to delete a database in order to release my resources. I'll never need replication nor the old version, nor logs anymore. But despite my frequently deletion of the database and recreating another, the disk space increases gradually.

How can I simply get rid of the whole database and it's affects on the disk?

Upvotes: 0

Views: 824

Answers (1)

Mike Rhodes
Mike Rhodes

Reputation: 1836

Deleting the database via DELETE /db-name removes the database's data and associated indexes on disk. The database is as deleted as it's going to be.

If you are using the purge feature to remove all the documents in the database, instead consider a DELETE followed by a PUT to recreate.

Logs are a different matter, as they are not database-specific, but for the database engine itself. It might be that you need to clear old logs, but you will probably only be able to do that on a time-based rather than database-based manner.

Upvotes: 4

Related Questions