A newer version of this documentation is available.

View Latest


Flushes all data from the disk for a given bucket.


The basic syntax is:

couchbase-cli bucket-flush -c [host]:8091 -u [admin] -p [password] [options]


Flushing will work only if this option was configured either during the initial bucket setup or after the bucket settings have been changed.

Flushing a bucket involves:

  1. Enable the flush bucket option.

  2. Flush the bucket.

By default, the bucket-flush command confirms whether or not you truly want to flush the bucket.

During a flush, any client operations will receive a temporary failure. Once the flush is completed all operations will work as normal.

It is recommended that the flush capability is not used in production systems as it irreversibly deletes every document in the bucket. Even for use cases where this is the desired behavior, flushing is not recommended as it is a very disruptive process. You can control and limit the ability to flush individual buckets by setting the flushEnabled parameter on a bucket in the Couchbase Web Console.


The following are the command options:

Table 1. bucket-flush options
Option Description


Named bucket to act on.


Force command execution without asking for confirmation.



couchbase-cli bucket-flush -c -u Administrator -p password \


This will flush the test bucket.