VestaCP fresh install cleanup

There’s a couple of steps we can take to make our crispy fresh VestaCP install even crispier!

Depending on your needs, you can make a full install and then remove unnecessary packages, or you can opt to not include it in the installation in the first place:

Install without Softaculous and PostgreSQL

First, we need to download the installation script:

curl -O http://vestacp.com/pub/vst-install.sh

No we can add additional parameters to install without Softaculous and PostgreSQL:

bash vst-install.sh --softaculous no --postgresql no

These are two packages we don’t use so we usually skip them. You can of course customize your installer on VestaCP’s official advanced install settings site, depending on your specific server use case (for DNS cluster, there is no use of vsftp/apache/nginx and so on).

Remove Softaculous

In case you already installed Softaculus and wish to remove it, you can disable it in the web GUI, but it usually still sends update email notifications. To completely disable it, run these three commands:

/usr/local/vesta/bin/v-delete-vesta-softaculous

And remove the crontab files:

rm -rf /etc/cron.d/softaculous
rm -rf /etc/cron.d/softaculous2

Remove pre-made user packages

We can do some additional cleanup and remove the (usually unused) user demo packages:

/usr/local/vesta/bin/v-delete-user-package palegreen 
/usr/local/vesta/bin/v-delete-user-package gainsboro 
/usr/local/vesta/bin/v-delete-user-package slategrey

Restore only specific domain

Another not so well documented VestaCP feature is restoring only a specific domain or database from the backup tar file. So let’s say we just want to restore domain.com and its respectful database admin_domaindb, while saving log file to restore.log:

USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]
v-restore-user admin admin.2019-08-14.tar 'domain.com' 'no' 'no' 'admin_domaindb' 'no' 'no'  yes >> /usr/local/vesta/log/restore.log 2>&1

2 thoughts on “VestaCP fresh install cleanup

Leave a Reply

Your email address will not be published. Required fields are marked *