> ## Documentation Index
> Fetch the complete documentation index at: https://docs.commonality.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Disallowing dependencies

`disallow` constraints will evaluate all **direct and transitive dependencies** for a package.

If any local dependency has [tags](/tags) that match a [selector](/selectors) within the `disallow` array, then the constraint will fail.

## Disallow specific direct or transitive dependencies

Use a [tag](/tags) as a [selector](/selectors) to disallow subsets of local dependencies.

```json theme={null}
{
  "disallow": ["application"]
}
```

## Disllow all dependencies

Use `*` as a [selector](/selectors) to disallow all local dependencies.

```json theme={null}
{
  "disallow": "*"
}
```

## Example

The following constraint...

```json .commonality/config.json theme={null}
{
  "constraints": {
    "high-availability": {
      "disallow": ["beta"]
    }
  }
}
```

...will fail for the following dependency graph.

<img src="https://mintcdn.com/commonality/BxL1sqZ47GBpRwVo/images/disallow-constraint.png?fit=max&auto=format&n=BxL1sqZ47GBpRwVo&q=85&s=0f81dcc82751cd120898ffdfe4a17c02" alt="A graph that shows that transitive dependencies are traversed with disallow constraints" width="3732" height="1577" data-path="images/disallow-constraint.png" />

This is due to the fact that a transitive dependency contains the matching `beta` tag.
