docs/user-guide/app_deletion.md
Apps can be deleted with or without a cascade option. A cascade delete, deletes both the app and its resources, rather than only the app.
argocdTo perform a non-cascade delete:
argocd app delete APPNAME --cascade=false
To perform a cascade delete:
argocd app delete APPNAME --cascade
or
argocd app delete APPNAME
kubectlTo perform a non-cascade delete, make sure the finalizer is unset and then delete the app:
kubectl patch app APPNAME -p '{"metadata": {"finalizers": null}}' --type merge
kubectl delete app APPNAME
To perform a cascade delete set the finalizer, e.g. using kubectl patch:
kubectl patch app APPNAME -p '{"metadata": {"finalizers": ["resources-finalizer.argocd.argoproj.io"]}}' --type merge
kubectl delete app APPNAME
metadata:
finalizers:
# The default behaviour is foreground cascading deletion
- resources-finalizer.argocd.argoproj.io
# Alternatively, you can use background cascading deletion
# - resources-finalizer.argocd.argoproj.io/background
When deleting an Application with this finalizer, the Argo CD application controller will perform a cascading delete of the Application's resources.
Adding the finalizer enables cascading deletes when implementing the App of Apps pattern.
The default propagation policy for cascading deletion is foreground cascading deletion.
Argo CD performs background cascading deletion when resources-finalizer.argocd.argoproj.io/background is set.
When you invoke argocd app delete with --cascade, the finalizer is added automatically.
You can set the propagation policy with --propagation-policy <foreground|background>.
Argo CD provides a consistent deletion experience across different views in the UI. When deleting applications, you can access the delete functionality from:
Starting in Argo CD 3.2, deletion behavior is now consistent across all UI views. Whether you delete an application from the Applications List or from the Resource Tree view, the same deletion mechanism and options are used.
Previously, deleting an application from the Resource Tree treated it as a generic Kubernetes resource, which could lead to unexpected behaviour with non-cascading deletes. Now, Argo CD properly detects Application resources and uses the standard Application deletion API in all contexts.
When using the App of Apps pattern, parent applications can contain child applications as resources. Argo CD automatically detects child applications and provides improved dialog messages to help you understand what you're deleting.
Argo CD identifies a child application by checking for the app.kubernetes.io/part-of label. If this label is present and has a non-empty value, the application is considered a child application.
When deleting a child application:
When deleting a regular application:
When deleting from the Resource Tree:
An additional informational note appears:
⚠️ Note: You are about to delete an Application from the resource tree. This uses the same deletion behaviour as the Applications list page.
This note clarifies that the deletion will use the proper Application deletion API, not generic Kubernetes resource deletion.
When deleting an application through the UI, you can choose from three propagation policies:
[!WARNING] Important for Non-Cascading Deletes
When you select Non-Cascading, Argo CD will:
- Remove the
resources-finalizer.argocd.argoproj.iofinalizer from the Application- Delete only the Application resource
- Leave all managed resources (Pods, Services, Deployments, etc.) running in the cluster
This behaviour is now consistent whether you delete from the Applications List or from the Resource Tree view.
When working with the App of Apps pattern:
Result: The child Application and all its managed resources (Deployments, Services, etc.) are deleted.
Result: Only the Application resource is deleted. All managed resources continue running in the cluster.
When you delete a child application from the Resource Tree view:
app.kubernetes.io/part-of labelThis ensures predictable and consistent deletion behaviour regardless of where you initiate the deletion.