# atmos helmfile source delete

Use this command to delete the vendored source directory for a Helmfile component. This removes the component directory that was created by `atmos helmfile source pull`.

**Source-Based Version Pinning**

Learn how to configure the `source` field for per-environment version control.

Design Pattern[Read more](/design-patterns/version-management/source-based-versioning)

## Usage

```shell
atmos helmfile source delete <component> --stack <stack> --force
```

## Description

The `delete` command removes the vendored component directory. For safety, this command requires the `--force` flag to confirm deletion.

This is useful for:

- Cleaning up vendored components before re-vendoring
- Removing components that are no longer needed
- Resetting to a clean state for troubleshooting

## Examples

### Delete Vendored Component

Remove a vendored component directory:

```shell
atmos helmfile source delete ingress-nginx --stack dev --force
```

Output:

```
Deleting directory: components/helmfile/ingress-nginx
✓ Successfully deleted: components/helmfile/ingress-nginx
```

### Without Force Flag

Attempting to delete without `--force` shows an error:

```shell
atmos helmfile source delete ingress-nginx --stack dev
```

Output:

```
Error: --force flag is required

Explanation: Deletion requires --force flag for safety

Hint: Use --force to confirm deletion
```

## Arguments

- **`component`**
  **Required.**
   The name of the Atmos component to delete.

## Flags

- **`--stack` / `-s`**
  **Required.**
   The Atmos stack name. Can also be set via 
  `ATMOS_STACK`
   environment variable.
- **`--force` / `-f`**
  **Required.**
   Confirm deletion. Without this flag, the command fails for safety.

## Safety

The `delete` command has several safety features:

1. **Requires --force** - Prevents accidental deletion
2. **Only deletes source-managed components** - Only works on components with `source` configured
3. **Non-destructive on missing directories** - Shows a warning if the directory doesn't exist instead of failing

## See Also

- [Source-Based Version Pinning](/design-patterns/version-management/source-based-versioning) — Design pattern for per-environment version control
- [`atmos helmfile source`](/cli/commands/helmfile/source) — Parent command overview
- [`atmos helmfile source pull`](/cli/commands/helmfile/source/pull) — Vendor component source
- [`atmos helmfile source list`](/cli/commands/helmfile/source/list) — List components with sources
- [`atmos helmfile source describe`](/cli/commands/helmfile/source/describe) — View source configuration
