---
title: "How would you delete a directory in Linux?"  
description: "How would you delete a directory in Linux?"  
author: "Mukul Goenka"  
published: 2022-04-15  
canonical: https://answers.mindstick.com/qa/96838/how-would-you-delete-a-directory-in-linux  
category: "troubleshooting"  
tags: ["troubleshooting", "linux"]  
reading_time: 1 minute  

---

# How would you delete a directory in Linux?

How would you [delete](https://www.mindstick.com/forum/159778/what-is-the-delete-statement-in-sql-and-how-is-it-used-to-remove-data-from-a-table) a [directory](https://www.mindstick.com/forum/1743/can-you-call-directory-getfiles-with-multiple-filters) in Linux?

## Answers

### Answer by Hitesh Vohra

![How would you delete a directory in Linux?](https://answers.mindstick.com/questionanswer/8f8abfd4-01ab-4c79-ac93-2c8e6149f5c9/images/c39382ab-313b-471c-878e-834ac4de71bd.jpeg)\

- If you use the GUI, removing a directory in [**Linux**](https://answers.mindstick.com/qa/96812/what-is-linux-kernel-is-it-legal-to-edit-linux-kernel) is a rather straightforward procedure. If you don't have access to the GUI, you can alternatively use terminal commands to remove folders.
- To **delete a directory** from the terminal window or command line, use one of the following Linux commands:
- The rm command deletes entire directories as well as their subdirectories and files.
- The rmdir command is used to get rid of empty directories.
- It's worth noting that the rm and rmdir commands destroy directories permanently rather than transferring them to the Trash directory. This means that these commands will not be able to recover a directory that has been deleted.

## \

**Read More: [How to rename a file in Linux?](https://answers.mindstick.com/qa/96833/how-to-rename-a-file-in-linux)**


---

Original Source: https://answers.mindstick.com/qa/96838/how-would-you-delete-a-directory-in-linux

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
