cleanup-dispvms 245 B

123456789101112
  1. #!/usr/bin/python3
  2. from qubesadmin import Qubes
  3. def main():
  4. app = Qubes()
  5. for vm in app.domains:
  6. if vm.klass == 'DispVM' and not vm.is_running():
  7. if vm.auto_cleanup:
  8. del app.domains[vm.name]
  9. main()