It is usual to have something like:
Code:
# Clean up
if [ "$1" = "--cleanup" ]; then
rm -rf ${TMP}/${NAME}-${VERSION}
rm -rf $PKG
fi
at the end of your slackbuild script, and the script cleans up after you when you call it like:
Code:
# sh prog.SlackBuild --cleanup
And yes, it is safe to remove those directories