---
name: "pmempool_rm"
section: "3"
platform: "linux"
package: "libpmempool-dev"
version: "1.13.1-1.1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pmempool_rm"
---

# pmempool\_rm(3)

remove persistent memory pool

## NAME

**pmempool\_rm**() - remove persistent memory pool

## SYNOPSIS

-

  ```
  #include <libpmempool.h>
  int pmempool_rm(const char *path, int flags);
  ```

## DESCRIPTION

The **pmempool\_rm**() function removes the pool pointed to by *path*. The *path* can point to a regular file, device dax or pool set file. If *path* is a pool set file, **pmempool\_rm**() will remove all part files from replicas using [**unlink**(2)](/unlink/2.md) before removing the pool set file itself.

The *flags* argument determines the behavior of **pmempool\_rm**(). It is either 0 or the bitwise OR of one or more of the following flags:

- •

  **PMEMPOOL\_RM\_FORCE** - Ignore all errors when removing part files from replicas.

- •

  **PMEMPOOL\_RM\_POOLSET\_LOCAL** - Also remove local pool set file.

## RETURN VALUE

On success, **pmempool\_rm**() returns 0. On error, it returns -1 and sets *errno* accordingly.

## SEE ALSO

**unlink**(3), [**libpmemlog**(7)](/libpmemlog/7.md), [**libpmemobj**(7)](/libpmemobj/7.md) and **\<https://pmem.io\>**
