Delete Document in CouchDB

CouchDB Delete Document

Using Fauxton:

  • Open the following URL:
  • Select the database that contains the document to delete.
  • Select the document to delete.
  • Click on the delete icon.
  • A pop-up message “Are you sure you want to delete this doc?” will be displayed.
  • Click on the OK button.
  • The selected document is thus deleted.


Using cURL utility:


curl -H 'Content-Type: application/json' \




Retrieve the latest revision id of the document to be deleted.

curl -X GET

Use the revision id in the below command.

curl -H 'Content-Type: application/json' \

-X DELETE ?rev=2-5fef7ea4661b53c017e123456e4f2beb



The response will contain 3 fields:

  • “ok”: It is used to specify that the operation is successful.
  • “id”: It is used to store the id of the document.
  • “rev”: It is used to specify the revision id. A _rev value is generated by CouchDB, every time when a document is revised (updated or modified).



Verify the document deleted using the below command:

curl -X GET   


Please follow and like us:
Content Protection by