You're just referring to the env.bak part right? It's just there in case the new env has some problem which does happen from time to time. So I save a backup of env.bak first. The rm -rf isn't really necessary and in fact isn't a great idea. If you run this script twice, the original env goes away completely. Better to backup to env.`date +%Y%m%d_%H%M%S` instead.