## TL;DR

Two files in the project (or across installed packages) define the same resource name, and dbt refuses to guess which one you mean. Find both files, rename one of them, or keep both and reference them with the two-argument `ref('package_name', 'model_name')` form.

## Error

```text
"dbt found two resources with the same name" duplicate model
```

## Steps

1. Run `dbt ls` and read the full error; it names the colliding resource. Expected: you know the duplicate name.
2. Search the project for files with that base name: check `models/`, `seeds/`, `snapshots/`, and installed packages under `dbt_packages/`. Expected: you find both definitions.
3. Decide: if one is stale, delete or rename it. Expected: only one file keeps the name.
4. If both must stay (for example the same model name in two packages), update references to the two-argument form `ref('package_name', 'model_name')`. Expected: every ref is unambiguous.
5. Run `dbt parse` and then `dbt compile`. Expected: no duplicate-name error.

## When to use

- `dbt parse` fails with "found two resources with the same name".
- You just installed a package that ships a model name you already use.

## When not to use

- Two models read from the same source table (that is fine; names are what must be unique).
- A model and a test share a name pattern (tests live in a separate namespace).

## Tool compatibility

- dbt Core 1.0 and later, all adapters. Resource uniqueness rules are adapter-independent.

## Variant phrasings

### dbt found two seeds / two snapshots with the same name

Same rule across resource types: seeds, snapshots, and models share one namespace per type.

### Ambiguous reference after installing dbt-utils or a community package

The package brought a colliding name; scope your refs or rename your model.

## Why it happens

dbt addresses nodes by name in `ref()`. Two nodes with one name make every downstream ref ambiguous, so dbt fails fast at parse time instead of picking one silently.

## Edge cases

- A model and a seed with the same name also collide; rename the seed file.
- Disabled models still count for name uniqueness in some versions; check `enabled` configs.
- File name casing differences (`Orders.sql` vs `orders.sql`) collide on case-insensitive filesystems.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_TlIUMM0gXMGkUifYAVllRA
