---
name: queue-exclude-dir
description: Unix-style glob of directories to exclude from the queue of Units to run.
type: list(string)
env:
  - TG_QUEUE_EXCLUDE_DIR
---

import { Aside } from '@astrojs/starlight/components';

Specifies directories to exclude when running commands with [`all`](/docs/reference/cli/commands/run#all).

This flag can be specified multiple times to exclude multiple directories. When using the `TG_QUEUE_EXCLUDE_DIR` environment variable, specify the directories as a comma-separated list.

To learn more about how to use this flag, see the [Stacks](/docs/features/stacks) feature documentation.

<Aside type="note">
When using `--queue-exclude-dir`, only the specified units are excluded, not their dependencies.

Dependencies of excluded units will still be run unless they are also explicitly excluded.
</Aside>

<Aside type="note">
Glob patterns must use Unix forward slashes `/` to separate directories, even on Windows machines.

Glob behavior for `**` and `**/*` will change in a future version of Terragrunt.

See the [double-star strict control](/docs/reference/strict-controls/#double-star) for full details.
</Aside>
