---
title: "nctl remediate"
diataxis: reference
applies_to:
  product: "nctl"
audience: ["developer","platform-engineer"]
last_updated: 2026-03-07
url: https://docs.nirmata.io/docs/nctl/commands/nctl_remediate/
---

## nctl remediate

Remediate a resource file or directory for policy violations

```bash
nctl remediate <resource file or directory> [flags]
```

### Options

```text
      --cluster-policies              Use policies from a cluster (default false)
      --details                       Show result details for violating resources (default true)
      --file string[="scan-report"]   Output file (if --file is used without a value, defaults to 'scan-report')
  -h, --help                          help for remediate
      --no-color                      disable the colors for the stdout reports
  -o, --output string                 Output format (text, json, yaml, scan-report, sarif) (default "text")
      --patch                         Update the source file with the remediated resource (default true)
  -p, --policies strings              Path to policy files
      --policy-sets strings           Policy set names (comma separated e.g., "pss-baseline, pss-restricted, rbac-best-practices")
```text

### Options inherited from parent commands

```text
  -v, --v Level   number for the log level verbosity
```

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata


