Never use rm's -f flag while operating as the root user. Never. Replace with -i until you are absolutely 100% certain the script you're writing works as expected. Always doubt yourself; be humble.
And the day you will be ssh'd on another computer, you may forget that you are using a command which is really deleting.