---
title: "Discussion on \"Delete All Merged Branches With Single Command\" | Hashnode"
description: "Discussion on \"Delete All Merged Branches With Single Command\". It is a good practice that we delete the branches once they are merged.\nBranches are just a pointer to a sepecific commit, once they are merged the commit is already there in the target branch, so there is no point to have merged branches cluttered i..."
url: "https://hashnode.com/posts/delete-all-merged-branches-with-single-command/60211c72281265375d6423f8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Delete All Merged Branches With Single Command](https://sujeet-agrahari.hashnode.dev/delete-all-merged-branches-with-single-command?utm_source=hashnode&utm_medium=feed)

It is a good practice that we delete the branches once they are merged. Branches are just a pointer to a sepecific commit, once they are merged the commit is already there in the target branch, so there is no point to have merged branches cluttered i...

Feb 8, 2021 · 3 min read · sujeet-agrahari.hashnode.dev  
Updated Feb 10, 2021  
Read the article

-   [#git](https://hashnode.com/tag/git)
-   [#github](https://hashnode.com/tag/github)
-   [#linux](https://hashnode.com/tag/linux)
-   [#programming](https://hashnode.com/tag/programming)
-   [#developer](https://hashnode.com/tag/developer)

## Written by

[Sujeet Agrahari](https://hashnode.com/@sujeet-agrahari)

@sujeet-agrahari · Bengaluru, India

  
[View profile](https://hashnode.com/@sujeet-agrahari)

Building efficient backend systems, one move at a time!

A backend engineer with a passion for chess and technology. 5 years of experience in deployment and development, proficient in Docker, Kubernetes, Nginx and multiple programming languages including Java, Javascript, Python, and Node.js.

## Responses 2

Markdown supported · ⌘↵ to post

[Oluwaseun Oyebade](https://hashnode.com/@motdde)

[Feb 9, 2021](https://hashnode.com/posts/delete-all-merged-branches-with-single-command/60211c72281265375d6423f8/comment/602308feaaa3543c903c0760)

This is a whole lot of bash firepower. Thanks for sharing.

[Edidiong Asikpo (Didi)](https://hashnode.com/@didicodes)

[Feb 8, 2021](https://hashnode.com/posts/delete-all-merged-branches-with-single-command/60211c72281265375d6423f8/comment/60212f74281265375d64277e)

I have never been in the position where I had to delete all the merged branches before. 😀

But I might be at some point, so I'll bookmark this article.

Thanks for sharing [Sujeet Agrahari](https://hashnode.com/@sujeet-agrahari)

[Sujeet Agrahari](https://hashnode.com/@sujeet-agrahari)

[Feb 8, 2021](https://hashnode.com/posts/delete-all-merged-branches-with-single-command/60211c72281265375d6423f8/comment/60212f74281265375d64277e#reply-60213d1a7d860b3782e8dab6)

Thanks [Edidiong Asikpo](https://hashnode.com/@didicodes) for giving your time on the article. 😊

Happy learning!
