Delete any directory Using root user in ubuntu/debian
Sometimes when you delete a directory in Ubuntu/Debian or any other Linux Os using direct delete button it give error of "cannot remove directory/: Permission denied"
To remove any directly in Linux , root user permissions are need to access the write mode of file. Therefore follow below steps to delete using rm -r command.
1. Press ctrl+alt+t to access the terminal and type below command to access root user.
sudo -s
2. Then move to the directory where the folder you want to delete is located using cd /directory location. Example:
cd /home/user
3. List the folder contents using ls command and then type:
rm -r foldername

Comments