Ubuntu: delete directory - how it works in Terminal and Explorer
On Ubuntu, you can delete a directory in both the Terminal and Explorer. We'll show you both ways.
Ubuntu: delete directory in the terminal - how it works
You can easily manage your files and directories on Ubuntu using the terminal.
- To delete a directory under Ubuntu, first start the terminal with the key combination [Ctrl] + [Alt] + [T] and navigate to the location where the desired folder is located.
- Then enter the command "rm -r directory", replacing "directory" with the name of the directory to be deleted. If you confirm the entry, the directory is deleted.
- The "-r" in the command means that all files in the selected directory are also deleted.
- If you are not yet familiar with the most important terminal commands under Ubuntu, you can call the help of the terminal at any time with "man" and the corresponding command. In the case of deletion, this would be, for example, the "man rm" command.
Delete directory in Explorer - so it'll work
Files and directories can be deleted in Explorer just as easily as in the terminal.
- First, navigate in the Ubuntu Explorer to the location of the directory that you want to delete.
- Then right-click on the directory to open the context menu.
- Now simply select "Delete" in the context menu - and the directory will be deleted.
In our next practical tip, we will show you how to install and set up Steam on Ubuntu.