Skip to content

Retiring the old system

The previous setup’s images, volumes and stack files stayed untouched through the whole rebuild, as a reference. Retiring them is the final phase, and it waits until the new system has run cleanly for a while and backups have been test-restored.

  1. Inventory. For each old image and volume: what replaced it, or “not restored”, with its size from docker system df -v.

  2. Decide per item — keep, archive, or delete. Data that isn’t yours to keep is deleted, not archived.

  3. Archive first. The pre-rebuild tarballs plus docker save of any image worth keeping, copied off the server.

  4. Remove by name only:

    Terminal window
    docker image rm <ref>
    docker volume rm <name>

    Never a blanket docker system prune — it can’t tell the old system from the new one.

  • Edit backups left on the server while fixing configs (*.orig-*, *.bak*).
  • Old .env backups that still contain a revoked token.
  • Push the infra repo’s fixes upstream (they’re on a local branch).