---
name: "PR_CAP_AMBIENT_CLEAR_ALL"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/PR_CAP_AMBIENT_CLEAR_ALL"
---

# PR\_CAP\_AMBIENT\_CLEAR\_ALL(2const)

clear the ambient capability set of the calling thread

## NAME

PR\_CAP\_AMBIENT\_CLEAR\_ALL - clear the ambient capability set of the calling thread

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <linux/prctl.h>  /* Definition of PR_* constants */
#include <sys/prctl.h>
```

**int prctl(PR\_CAP\_AMBIENT, PR\_CAP\_AMBIENT\_CLEAR\_ALL, 0L, 0L, 0L);**

## DESCRIPTION

All capabilities will be removed from the ambient capability set.

## RETURN VALUE

On success, 0 is returned. On error, -1 is returned, and *errno* is set to indicate the error.

## VERSIONS

See [**PR\_CAP\_AMBIENT**(2const)](/PR_CAP_AMBIENT/2const.md).

## STANDARDS

Linux.

## HISTORY

Linux 4.3.

## SEE ALSO

[**prctl**(2)](/prctl/2.md), [**PR\_CAP\_AMBIENT**(2const)](/PR_CAP_AMBIENT/2const.md), [**libcap**(3)](/libcap/3.md)
