Remove/ Delete a full directory in Linux / Ubuntu

Published on : April 27, 2026

Author:

Category: Ubuntu


To remove a directory that is full with other files or directories, use the below command.

rm -r directory

In the above example the command would prompt you as directories and files were being deleted if you wanted to force the delete with no prompts add the ‘f’ option to the command as shown below :

rm -rf directory

Thank you.


Leave a Reply

Your email address will not be published. Required fields are marked *