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.

Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es