---
name: "memflush"
section: "1"
platform: "linux"
package: "libmemcached-awesome"
version: "1.1.4-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/memflush"
---

# memflush(1)

libmemcached Documentation

## NAME

memflush - libmemcached Documentation

## SYNOPSIS

memflush \[options\]

Reset a server or list of servers

## DESCRIPTION

**memflush**  resets the contents of **[memcached(1)](/memcached/1.md) \<https://linux.die.net/man/1/memcached\>** servers.

**Warning:**

This means that all data in the specified servers will be deleted.

## OPTIONS

- **-h\|--help**

  Display help.

- **-V\|--version**

  Display version.

- **-q\|--quiet**

  Operate quietly.

- **-v\|--verbose**

  Operate more verbosely.

- **-d\|--debug**

  See **-v\|--verbose**.

- **-s\|--servers \<list of servers\>**

  Specify the list of servers as *hostname\[:port\]\[,hostname\[:port\]...\]*.

- **-n\|--non-blocking**

  Enable non-blocking operations.

- **-N\|--tcp-nodelay**

  Disable Nagle's algorithm.

- **-b\|--binary**

  Enable binary protocol.

- **-B\|--buffer**

  Buffer requests.

- **-u\|--username \<username\>**

  Use *username* for SASL authentication.

- **-p\|--password \<password\>**

  Use *password* for SASL authentication.

- **-e\|--expire \<expiration\>**

  Use *expiration* seconds (or a UNIX timestamp).

**Note:**

Using an expiration time (period), all keys, which have not bean updated until expiration will cease to exist.

Quoting the memcached protocol documentation \<https://github.com/memcached/memcached/blob/master/doc/protocol.txt\>, it states:

Its effect is to invalidate all existing items immediately (by default) or after the expiration specified.  After invalidation none of the items will be returned in response to a retrieval command (unless it's stored again under the same key *after* flush\_all has invalidated the items).

The most precise definition of what flush\_all does is the following: it causes all items whose update time is earlier than the time at which flush\_all was set to be executed to be ignored for retrieval purposes.

The intent of flush\_all with a delay, was that in a setting where you have a pool of memcached servers, and you need to flush all content, you have the option of not resetting all memcached servers at the same time (which could e.g. cause a spike in database load with all clients suddenly needing to recreate content that would otherwise have been found in the memcached daemon).

## ENVIRONMENT

- **MEMCACHED\_SERVERS**

  Specify a list of servers.

## NOTES

### PROGRAM PREFIX

The prefix of this program is variable, i.e. it can be configured at build time.

Usually the client programs of **libmemcached-awesome** are prefixed with **mem**, like **memcat** or **memcp**.

It can be configured, though, to replace the prefix with something else like **mc**, in case of that, the client programs of **libmemcached-awesome** would be called **mccat**, **mccp**, etc. respectively.

## SEE ALSO

**[memcached(1)](/memcached/1.md) \<https://linux.die.net/man/1/memcached\>** **[libmemcached(3)](/libmemcached/3.md) \<https://linux.die.net/man/3/libmemcached\>**

- •

  C/C++ Client Library for memcached \<\>

- •

  Wiping clean the contents of a server \<\>
