The rm -rf is a dangerous command. Use at your own discretion. A man who owns a server that run thousands of website learned this lesson the hard way. If there’s anything to learn from this experience, it’s probably best not to use rm -rf within your scripts. If you really have to, you need to have to be explicit with your commands by including the full path. If the relative path fails, the deletes are explicit for that particular directory and nowhere else.