ubuntu delete folder and contents code example
Example 1: ubuntu remove directory
rm -R folder-name
Example 2: remove folder ubuntu
sudo rm -rf folder-name
Example 3: how to forcefully delete a directory in linux
rm -rf dirname
Example 4: ubuntu delete contents of folder
To remove all non-hidden files and sub-directories (along with all of their contents) in a
directory use:
rm -r /path/to/directory/*