# `package.not_installed`

The app's lock file, `jadpo.lock`, lists a package whose folder in `packages/` isn't there.

Area 11, [External services](/docs/external-services.md); not declinable; the next step is usually the human's.

## Why Jadpo refuses it

Each line of `jadpo.lock` is a package installed in `packages/`, with its
version, digest and where it came from. Here the line has no folder, so
the lock and the app disagree about what is installed. That is what
deleting a package's folder by hand leaves.

Jadpo won't choose for you whether the package should be back or gone.
Your app may still need it, and only you know whether it was removed on
purpose.

## What it looks like


The lock lists `Postcodes.v2`, and the app has no `packages/` folder.

jadpo.lock:

```jadpo
// Generated by Jadpo from the installed packages; update it with `jadpo package add`, `update` or `remove`, never by hand.
record lock 1

package Postcodes.v2 version 2.1.0 path ../postcodes digest sha256:0000000000000000000000000000000000000000000000000000000000000000
```

```text
error: `jadpo.lock` names `Postcodes.v2`, which isn't installed
 --> jadpo.lock
  reason: Each line of the lock is a package in `packages/`; `Postcodes.v2` has none at `packages/postcodes/v2/`, so the lock and the folder disagree, as removing the folder by hand leaves them.
  next: Restore `packages/postcodes/v2/` from version control, or remove the package with `jadpo package remove` (human)
  rule: package.not_installed
  help: https://jadpo.dev/docs/errors/package.not_installed

check failed: 1 error, 1 file
```

`(human)` at the end of the `next:` line tells your coding agent to stop
and ask you which fix you want, because the choice is yours to make: it
decides whether the app keeps `Postcodes.v2`.

## How to fix it

The question is whether the app should still have the package.

**If it should**, restore its folder from version control:

```sh
git restore packages/postcodes/v2/
```

The package is installed again as the lock describes it, and code that
uses it compiles.

**If it shouldn't**, remove it with Jadpo, which takes its line out of
the lock:

```sh
jadpo package remove postcodes
```

The lock keeps no line for it. jadpo.lock:

```jadpo
// Generated by Jadpo from the installed packages; update it with `jadpo package add`, `update` or `remove`, never by hand.
record lock 1
```


The app no longer has `Postcodes.v2`. `jadpo package remove` is refused
while any file still has `use packages/postcodes`, and names each one.

## Related

- [Installing safely](/docs/where-packages-come-from.md#installing-safely)
- [Where packages live](/docs/where-packages-live.md)
- [How packages are installed and linked](/docs/how-packages-are-installed-and-linked.md)
