What is the Command to Remove a Folder/Directory in Ubuntu?

rm -R /path command is used to delete a directory in Ubuntu.

For example, if I want to remove a directory public_html from the Ubuntu server, then I will write the command with a path like this in the terminal.

sudo rm -R /var/www/hindi.bststatus.com/public_html

sudo word is written for administrative privileges.

Leave a Comment