---
title: Safely Removing an ApplicationSet While Preserving Managed Kubernetes Resources
description: Understanding preserveResourcesOnDeletion and Its Behavior in Argo CD
---

[Skip to content](https://support.akuity.io/kb/safely-removing-an-applicationset-while-preserving-managed-kubernetes-resources#main-content)

English

Show submenu for translations

[![Akuity-Logo-Color-1](https://support.akuity.io/hubfs/Akuity-Logo-Color-1.svg)](https://akuity.io/)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Help Center](https://support.akuity.io/kb?hsLang=en)
2. [Argo CD](https://support.akuity.io/kb/argo-cd?hsLang=en)
3. [ApplicationSet](https://support.akuity.io/kb/argo-cd?hsLang=en#applicationset)

# Safely Removing an ApplicationSet While Preserving Managed Kubernetes Resources

## Understanding preserveResourcesOnDeletion and Its Behavior in Argo CD

When decommissioning an `ApplicationSet`, you might want to **preserve the underlying Kubernetes resources** created by the Applications it generated.

Argo CD provides the `preserveResourcesOnDeletion` flag for this purpose.

### **Key Configuration**

To ensure managed resources are **not deleted** when the `ApplicationSet` is removed, set this in your `ApplicationSet`:

`spec:`  
`  syncPolicy:`  
`    preserveResourcesOnDeletion: true`

This instructs Argo CD **not to prune** Kubernetes resources when the `ApplicationSet` is deleted.

### **Important Notes**

- ✅ **Kubernetes resources will be preserved**
- ❌ **Argo CD Applications will be removed** (unless otherwise handled)
- 🚫 **No need to set `PrunePropagationPolicy=orphan`**
  
    - This is used only during **Application syncs**, not AppSet deletion.
- ⚠️ **Sync event is not triggered on AppSet deletion**, so no additional sync logic applies.

### **Preserving Argo CD Applications**

If you also want to **retain the Argo CD `Application` resources**, follow this guide:

📘 [How to prevent deleting generated Applications](https://argo-cd.readthedocs.io/en/latest/operator-manual/applicationset/Controlling-Resource-Modification/#how-to-prevent-applicationset-from-deleting-generated-application-resources)

In short:

- Set `applicationsSync: create-update` in `.spec.syncPolicy` of the `ApplicationSet`
- Add the finalizer manually to each generated Application:
  
  `metadata:`  
  `  finalizers:`  
  `  - resources-finalizer.argocd.argoproj.io`

You’re safe to delete the `ApplicationSet` if:

- `preserveResourcesOnDeletion: true` is set ✅
- You **don’t need** the Argo CD `Application` resources afterward

If you need to keep both the Applications and their managed resources, apply both the syncPolicy and finalizers as documented.

- [Argo CD](https://support.akuity.io/kb/argo-cd?hsLang=en#main-content)

    - [App of Apps](https://support.akuity.io/kb/argo-cd?hsLang=en#app-of-apps)
    - [Configuration](https://support.akuity.io/kb/argo-cd?hsLang=en#configuration)
    - [ApplicationSet](https://support.akuity.io/kb/argo-cd?hsLang=en#applicationset)
- [Akuity Platform](https://support.akuity.io/kb/akuity-platform?hsLang=en#main-content)

    - [Audit Logs](https://support.akuity.io/kb/akuity-platform?hsLang=en#audit-logs)
    - [IP Allow Lists](https://support.akuity.io/kb/akuity-platform?hsLang=en#ip-allow-lists)
    - [Terraform](https://support.akuity.io/kb/akuity-platform?hsLang=en#terraform)
    - [Configuration](https://support.akuity.io/kb/akuity-platform?hsLang=en#configuration)
    - [Agents](https://support.akuity.io/kb/akuity-platform?hsLang=en#agents)
    - [Troubleshooting](https://support.akuity.io/kb/akuity-platform?hsLang=en#troubleshooting)
- [Kargo](https://support.akuity.io/kb/kargo?hsLang=en#main-content)

    - [Configuration](https://support.akuity.io/kb/kargo?hsLang=en#configuration)
    - [Warehouses](https://support.akuity.io/kb/kargo?hsLang=en#warehouses)
    - [Metrics](https://support.akuity.io/kb/kargo?hsLang=en#metrics)
- [Self-hosted Akuity Platform](https://support.akuity.io/kb/self-hosted-akuity-platform?hsLang=en#main-content)

    - [Configuration](https://support.akuity.io/kb/self-hosted-akuity-platform?hsLang=en#configuration)

[![Akuity-Logo-Color-1](https://support.akuity.io/hubfs/Akuity-Logo-Color-1.svg "Akuity-Logo-Color-1")](https://akuity.io/)

Akuity.io Help Center

Copyright © 2025, Akuity Inc.