How to delete directory on Linux - LinuxConfig.org

Deleting a directory (also called folder) on Linux is a common task that every user will have to perform at some time or another. This can be done via any desktop environment that you have installed, or from command line with the rm command.

While this is a pretty basic function, there are some important caveats to keep in mind. In this guide, we'll go over several examples of deleting a directory on Linux. Feel free to follow along on your own system in order to master the rm command and GUI process.


This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-delete-directory-on-linux

In Linux everything is a file. So be careful with deleting Linux files and directories. Linux will let you delete files needed for your computer to boot or run.