product:clean
Nuclear reset: stop all containers, wipe volumes, reset the database, and clear uploads and logs.
Usage
splent product:clean [--dev] [--prod] [--yes]
Options
| Option | Description |
|---|---|
--dev |
Use the development Docker Compose file. |
--prod |
Use the production Docker Compose file. |
--yes |
Skip the confirmation prompt. |
If neither --dev nor --prod is given, SPLENT_ENV is used (defaults to dev).
What it does
Executes four steps in order:
1. Docker Compose down βvolumes
Runs docker compose down -v for the product itself and for every feature declared in pyproject.toml. All containers are stopped and all named volumes are deleted.
2. Database reset
Runs splent db:reset --clear-migrations --yes to drop and recreate the database and regenerate all migrations from scratch.
3. Clear uploads
Runs splent clear:uploads to empty the uploads directory.
4. Clear application log
Runs splent clear:log to truncate the application log file.
Example output
β οΈ This will completely wipe sample_splent_app (dev):
- Stop all Docker containers and remove volumes
- Reset the database and regenerate migrations
- Clear uploads and application log
Continue? [y/N]: y
π³ Stopping containers and removing volumes...
π sample_splent_app stopped and volumes removed.
π splent_io/splent_feature_auth stopped and volumes removed.
ποΈ Resetting database...
β Database reset.
ποΈ Clearing uploads...
β Uploads cleared.
π Clearing application log...
β Log cleared.
β
sample_splent_app (dev) fully cleaned. Run 'splent product:up' to start fresh.
When to use this
- After pulling breaking changes that require a clean database schema.
- When the environment has drifted and you need a guaranteed clean slate.
- Before running integration tests that require a pristine state.
This command is irreversible. All data in Docker volumes and the database will be permanently deleted. Use --yes only in automated pipelines where you are certain this is the intended action.
See also
product:upβ start the product after a clean.db:resetβ reset only the database without touching Docker or files.product:downβ stop containers without removing volumes.