Make these simply:

    rm -rf addon/data/$B2G_PLATFORM
    rm -rf addon/template

Then you'll also delete any hidden files (i.e. those beginning with a dot) in those directories as well as the directories themselves.