how to delete several virtual servers at one time?

i have a virtualmin installation that has over 100 virtual servers. I would like to delete all of the servers but to go through and use the server delete screen seems to be a bit slow... is there a way to simply wipe all trace of these out quickly?

Status: 
Active

Comments

Well, you could always write a script that uses the command line tools to do that.

The commands "virtualmin list-domains" and "virtualmin delete-domain" would probably be what you'd need to use, then build your script around those.

That said -- since you're looking to delete all the Virtual Servers, have you considered performing a fresh install with a newer Linux distribution? There's about another year and a half of support for Ubuntu 8.04. But, if you were to install Ubuntu 10.04, you'd have several more years of support -- and you'd get all the benefits of the more recent software :-)

You could delete all virtual servers with a script like :

for dom in \`virtualmin list-domains --name-only --toplevel\`; do
  virtualmin delete-domain --domain $dom
done