// Module included in the following assemblies:
//
// * security/compliance_operator/co-scans/compliance-operator-remediation.adoc

:_mod-docs-content-type: PROCEDURE
[id="compliance-unapplying_{context}"]
= Unapplying a remediation

[role="_abstract"]
You can unapply a remediation that was previously applied.

.Procedure
. Set the `apply` flag to `false`:
+
[source,terminal]
----
$ oc -n openshift-compliance \
patch complianceremediations/rhcos4-moderate-worker-sysctl-net-ipv4-conf-all-accept-redirects \
--patch '{"spec":{"apply":false}}' --type=merge
----

. Verify that the remediation status has changed to `NotApplied` and the composite `MachineConfig` object is re-rendered to not include the remediation.
+
[IMPORTANT]
====
All affected nodes with the remediation will be rebooted.
====
+
[IMPORTANT]
====
The Compliance Operator does not automatically resolve dependency issues that can occur between remediations. Users should perform a rescan after remediations are applied to ensure accurate results.
====