> ## Documentation Index
> Fetch the complete documentation index at: https://p-bitm-2269ecee.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Maintenance

> Perform routine P-BitM updates, diagnostics, cleanup, and credential rotation.

## Routine checks

```bash theme={"system"}
python3 p-bitm.py status
python3 p-bitm.py doctor
```

Review container health, disk capacity, certificate expiry, database
integrity, image freshness, and unexpected campaign workloads.

## Rebuild after updates

```bash theme={"system"}
python3 -m pip install -r requirements.txt
python3 p-bitm.py up --build
python3 p-bitm.py doctor --strict
```

## Clean inactive workloads

Remove application-owned target-browser containers:

```bash theme={"system"}
python3 p-bitm.py cleanup
```

Also remove all application-owned campaign workloads and isolated networks:

```bash theme={"system"}
python3 p-bitm.py cleanup --campaigns
```

The second form is destructive and asks for confirmation when
`cli.confirm_destructive` is enabled.

## Reset images

`reset` stops application services and removes application-owned containers
and configured Docker images. It preserves the database and stored campaign
artifacts:

```bash theme={"system"}
python3 p-bitm.py reset
python3 p-bitm.py up --build
```

Use it only when a full image rebuild is intended.

<Warning>
  Container logs are not part of persistent P-BitM storage and are lost when
  their containers are removed unless the Docker logging configuration sends
  them elsewhere.
</Warning>
