i don't know if it makes sense to write a script for this, so i created a checklist for manual removal of a domain. check it out at /usr/local/hosting/doc/checklist_domain_removal.txt
i switched on the bash completion in /etc/bash.bashrc. so now many commands make wise suggestions at pressing tab. try it with chown or man. very useful.