# Deleted branch not going away

**URL:** <https://forum.gitea.com/t/deleted-branch-not-going-away/469>\
**Category:** Install/Maintain/Configure\
**Created:** [August 2, 2018, 2:15pm UTC](https://forum.gitea.com/t/deleted-branch-not-going-away/469 "2018-08-02T14:15:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkraul](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/bkraul/32/4728_2.png) [@bkraul](https://forum.gitea.com/u/bkraul)\
**Post date:** [August 2, 2018, 2:15pm UTC](https://forum.gitea.com/t/deleted-branch-not-going-away/469/1 "2018-08-02T14:15:20Z")

</div>

I deleted a remote branch on my repository. However, it still shows up with strikeout, and I can’t seem to be able to get rid of it. It no longer exists at the git level, and if I click on it, it takes me to a 404 page. I am not sure what the other button (looks like undo) is supposed to do, but it does not do anything.

Do I have to trigger garbage collection in order for all references of this branch to go away?

There is a “Garbage collection” option under Site Settings, but it freezes the site every time I try using it.

Any ideas on how to solve this?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/1X/fffc1fc57e322ef149d0d804f12996d3aed233f5.png)

---

<div class="post-metadata">

**Author:** ![jmacenka](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@jmacenka](https://forum.gitea.com/u/jmacenka)\
**Post date:** [July 26, 2021, 10:26am UTC](https://forum.gitea.com/t/deleted-branch-not-going-away/469/2 "2021-07-26T10:26:19Z")

</div>

Did you find a way to resolve this? Facing the same issue currently…

---

<div class="post-metadata">

**Author:** ![amans](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@amans](https://forum.gitea.com/u/amans)\
**Post date:** [April 4, 2024, 3:23am UTC](https://forum.gitea.com/t/deleted-branch-not-going-away/469/3 "2024-04-04T03:23:59Z")

</div>

Hi, is there any update on this, I am facing the same issue ,  
as I am using Gitea Version 1.21.10

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [April 4, 2024, 4:56am UTC](https://forum.gitea.com/t/deleted-branch-not-going-away/469/4 "2024-04-04T04:56:14Z")

</div>

I don’t think your problem is the same as before because from 1.21, all branches have been synced into database. Could you have a screenshot?

---

<div class="post-metadata">

**Author:** ![amans](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@amans](https://forum.gitea.com/u/amans)\
**Post date:** [May 29, 2024, 5:54pm UTC](https://forum.gitea.com/t/deleted-branch-not-going-away/469/5 "2024-05-29T17:54:16Z")

</div>

The deleted branches went away after clicking the “Garbage collection” under Site Settings

---

<div class="post-metadata">

**Author:** ![delvh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/delvh/32/5047_2.png) [@delvh](https://forum.gitea.com/u/delvh)\
**Post date:** [May 29, 2024, 7:48pm UTC](https://forum.gitea.com/t/deleted-branch-not-going-away/469/6 "2024-05-29T19:48:56Z")

</div>

Yep, they are kept by git for some time, I think the default is 7 days.  
Unless of course you manually run GC (i.e. via the admin settings), then they are removed immediately.
