calicoctl review unused-policies
This section describes the calicoctl review unused-policies command.
Read the calicoctl Overview for a full list of calicoctl commands.
Displaying the help text for 'calicoctl review unused-policies' command​
Run calicoctl review unused-policies --help to display the following help menu for the command.
Usage:
calicoctl review unused-policies [-t <duration>] [-o ps|json]
Options:
-h --help Show this screen.
-t <duration> Time window to check for activity. Format:
<number>d (e.g., 30d, 90d). [default: 90d]
-o ps|json Output format. [default: ps]
--server <url> Voltron server address.
--token <value> Bearer token for authentication.
--token-file <path> Path to a file containing the bearer token.
Description:
List network policies and rules that have not evaluated any traffic
within the specified time window.
Example​
List policies and rules that have not evaluated traffic in the past 30 days:
calicoctl review unused-policies -t 30d
For a walkthrough of the output and guidance on interpreting it, see Review unused network policies.