how to delete a full directory in bash code example
Example 1: linux remove folder and all his content
rm -rf /path/to/directory/*
Example 2: delete a directory bash script
rmdir dirname
rm -rf /path/to/directory/*
rmdir dirname