---
title: "calicoctl ipam check"
description: "Reference for the calicoctl IPAM check command in Calico Enterprise, used to audit IP address allocation consistency across the cluster."
product: "Calico Enterprise"
version: "3.23 (latest)"
section: "Reference"
canonical_url: "https://docs.tigera.io/calico-enterprise/latest/reference/clis/calicoctl/ipam/check"
---

# calicoctl ipam check

This section describes the `calicoctl ipam check` command.

Read the [calicoctl overview](https://docs.tigera.io/calico-enterprise/latest/reference/clis/calicoctl/overview.md) for a full list of calicoctl commands.

## Displaying the help text for 'calicoctl ipam check' command

Run `calicoctl ipam check --help` to display the following help menu for the command.

```text
Usage:
  calicoctl ipam check [--config=<CONFIG>] [--show-all-ips] [--show-problem-ips] [-o <FILE>]

Options:
  -h --help                    Show this screen.
  -o --output=<FILE>           Path to output report file.
     --show-all-ips            Print all IPs that are checked.
     --show-problem-ips        Print all IPs that are leaked or not allocated properly.
  -c --config=<CONFIG>         Path to the file containing connection configuration in
                               YAML or JSON format.
                               [default: /etc/calico/calicoctl.cfg]
  --kubeconfig=<KUBECONFIG> Path to kubeconfig file

Description:
  The ipam check command checks the integrity of the IPAM datastructures against Kubernetes.
```

### Examples

Example workflow for checking consistency and releasing leaked addresses.

**Lock the data store**

```bash
calicoctl datastore migrate lock
```

> **SECONDARY:** Once the data store is locked, new pods will not be able to be launched until the data store is unlocked.

**Generate a report using the check command**

```bash
calicoctl ipam check -o report.json
```

**Release any unnecessary addresses**

```bash
calicoctl ipam release --from-report report.json
```

**Unlock the data store**

```bash
calicoctl datastore migrate unlock
```

## See also

- [Installing calicoctl](https://docs.tigera.io/calico-enterprise/latest/operations/clis/calicoctl/install.md)
