I am unable to delete an old branch

Kostiantyn Kulach March 21, 2023

I have a task to delete over 11k old branches. 

I decided to test it manually on the first one and it shows me the error:


I have reviewed similar topics here and I see only 2 things preventing the branch deletion:

1. Some active PullRequests are present

2. Branch restriction

I have double-checked both and there are no PRs and no Branch Restrictions.

It doesn't work for me either through the UI or through the git command:


Please, advise.

1 answer

1 accepted

1 vote
Answer accepted
Victor Menes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 21, 2023

Hey Kostiantyn,


Let me see if I can help you with this... It would be good to take a look into this Stack Overflow thread that would be very useful for your current issue!


From the thread:

You need to specify the name of the branch on the remote repository; not the name of your remote branch. So, the meaning of git push origin -d origin/TEST, for example, is that you have a branch called TEST in the remote server origin


That being said, you could try out the below command with the values adjusted from your side:

git push origin --delete test 
Kostiantyn Kulach March 21, 2023

Thanks, Victor! It helped!

Like Victor Menes likes this

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events