Submitted by nmournian@yahoo.com on Wed, 11/16/2011 - 07:29
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
Submitted by andreychek on Wed, 11/16/2011 - 08:21 Comment #1
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 :-)
Submitted by JamieCameron on Wed, 11/16/2011 - 11:48 Comment #2
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