dvs check
Check and repair applications, remove orphaned resources.
Descriptionβ
The check command diagnoses and fixes issues with your DVS installation:
- Repairable apps: Applications with missing
.devspacesfile that can be repaired - Orphaned MySQL/MariaDB databases: Databases that are not referenced by any installed application
- Orphaned SQL users: MySQL/MariaDB database users that are not referenced by any installed application
- Orphaned app configurations: App configuration directories whose
APP_ROOTorAPP_WEB_ROOTdirectories no longer exist
The command first offers to repair any fixable issues, then identifies orphaned resources for cleanup.
Usageβ
dvs check [--dry-run]
Optionsβ
--dry-run: Display what would be repaired or deleted without actually making any changes.
Important Notesβ
- Interactive: The command allows you to select which resources to repair or delete using interactive prompts
- Repair first: Repairable apps are handled before orphan cleanup
- Safe: Only resources not referenced by valid apps are shown for deletion
- Service Management: The command automatically starts MySQL/MariaDB services if they are not running
Examplesβ
Repair an app with missing .devspaces fileβ
$ dvs check
DVS Check
[!] Repairable apps (missing .devspaces file):
- myapp (/Users/dev/myapp)
β Repair these apps by recreating .devspaces files?
[No] [Yes]
β Yes
[β] Repaired myapp
Check Analysis:
No orphaned resources found.
Remove orphaned databasesβ
$ dvs check
DVS Check
Check Analysis:
Orphaned databases:
- old_app_db (from mysql-8.0)
Select resources to delete (space to toggle, enter to confirm):
[β] All
[ ] db:old_app_db
[ ] Cancel
Deleting database old_app_db ... β
Check completed.
Dry-run Modeβ
Preview what would be repaired or deleted:
$ dvs check --dry-run
DVS Check (dry-run)
[!] Repairable apps (missing .devspaces file):
- myapp (/Users/dev/myapp)
[i] Dry-run: would recreate .devspaces files for these apps
Check Analysis:
Orphaned databases:
- old_app_db (from mysql-8.0)
Dry-run mode: The following resources would be deleted:
- old_app_db (from mysql-8.0)
No changes were made (dry-run mode).
Related Commandsβ
dvs mysqlconsole- Root access to MySQL/MariaDBdvs status- List services and applications with their status