# Delete Folder and sub-folders

**URL:** <https://community.amazonquick.com/t/delete-folder-and-sub-folders/46520>\
**Category:** Q&A\
**Tags:** api, developer, quick-sight\
**Created:** [May 22, 2025, 6:04pm UTC](https://community.amazonquick.com/t/delete-folder-and-sub-folders/46520 "2025-05-22T18:04:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alltej](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@alltej](https://community.amazonquick.com/u/alltej)\
**Post date:** [May 22, 2025, 6:04pm UTC](https://community.amazonquick.com/t/delete-folder-and-sub-folders/46520/1 "2025-05-22T18:04:32Z")

</div>

Is there an option to delete folder and subfolders (recursively)?

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [May 22, 2025, 6:27pm UTC](https://community.amazonquick.com/t/delete-folder-and-sub-folders/46520/2 "2025-05-22T18:27:50Z")

</div>

Hi @alltej,  
You can use the following CLI command to assist with this:

> **[DeleteFolder - Amazon QuickSight](https://docs.aws.amazon.com/quicksight/latest/developerguide/delete-folder.html)**
>
> The DeleteFolder Operation.

It looks like there’s a thread from roughly 2 years ago where a solution was shared and it worked for you, I would suggest revisiting this post as well!

> [@How to delete folder that is not empty using the cli?](https://community.amazonquick.com/t/how-to-delete-folder-that-is-not-empty-using-the-cli/12827/3):
>
> Hi @alltej - as it stands today, you need to remove the assets from the folder before you can delete the folder itself. Using the API you would call the [list-folder-members](https://docs.aws.amazon.com/cli/latest/reference/quicksight/list-folder-members.html) command to get all the assets within that folder, then iterate through them using [delete-folder-membership](https://docs.aws.amazon.com/cli/latest/reference/quicksight/delete-folder-membership.html) until it is empty. Finally you can delete the folder using [delete-folder](https://docs.aws.amazon.com/cli/latest/reference/quicksight/describe-folder.html). To be clear, this does not delete the assets themselves, it just removes them from the folder.

Let us know if you have any additional questions

---

<div class="post-metadata">

**Author:** ![Xclipse](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/xclipse/32/20455_2.png) [@Xclipse](https://community.amazonquick.com/u/Xclipse)\
**Post date:** [June 1, 2025, 10:37am UTC](https://community.amazonquick.com/t/delete-folder-and-sub-folders/46520/3 "2025-06-01T10:37:55Z")

</div>

Hi @alltej

It’s been a while since we last heard from you. If you have any further questions, please let us know how we can assist you.

If we don’t hear back within the next 3 business days, we’ll proceed with close/archive this topic.

Thank you!

---

<div class="post-metadata">

**Author:** ![Xclipse](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/xclipse/32/20455_2.png) [@Xclipse](https://community.amazonquick.com/u/Xclipse)\
**Post date:** [June 4, 2025, 5:58pm UTC](https://community.amazonquick.com/t/delete-folder-and-sub-folders/46520/4 "2025-06-04T17:58:22Z")

</div>

Hi @alltej

Since we have not heard back from you, I’ll go ahead and close/archive this topic. However, if you have any additional questions, feel free to create a new topic in the community and link this discussion for relevant information.

Thank you!
