In this article, I will walk you through exactly how to remove a pull request from Azure DevOps, explain the critical difference between “Abandoning” and “Deleting,” and show you the professional way to clean up your repository history.
Table of Contents
How To Delete Pull Request In Azure DevOps
The Hard Truth: You Cannot “Delete” a PR
Before we dive into the tutorial, we need to clear up a major misconception. In Azure DevOps, you cannot permanently delete a pull request record from the database.
Unlike a local Git branch which you can delete --force and wipe from existence, Azure DevOps is an enterprise tool designed for strict auditing. If you could secretly delete a PR, you could hide code reviews or compliance checks. Therefore, Microsoft does not provide a “Delete” button.
Instead, the mechanism we use is Abandon.
When you abandon a PR:
- It is removed from the “Active” list.
- The code is not merged.
- It is essentially archived as “Cancelled.”
- It will still exist in the “Abandoned” tab for historical reference.
If your goal is to get it off your team’s dashboard and stop the build policies from running, Abandoning is the solution you are looking for.
How to Delete (Abandon) a Pull Request: Step-by-Step
If you have a PR that was opened by mistake or is no longer relevant, here is how you remove it from your active queue.
- Log in to your Azure DevOps organization (
https://dev.azure.com/YourOrg). - Open your Project.
- On the left-hand sidebar, hover over Repos and click on Pull requests as shown in the screenshot below.

Step 2: Locate the Target PR
By default, you might only see PRs assigned to you.
- Click on the Mine tab to see PRs you created.
- Click on the Active tab to see all open PRs in the repository.
- Click the title of the PR you want to remove to open its details page.

Step 3: The Abandon Action
- Look at the top-right corner of the PR screen. You will see a Complete button (usually blue). Do not click this.
- Next to the Complete button, there is a three-dot menu icon ( … ) or sometimes a button labeled “Abandon” depending on your version.
- Click the menu and select Abandon.
Step 4: Confirm the Action
A dialog box will appear asking for a reason.
- Pro Tip: Always type a reason (e.g., Targeted wrong branch or Duplicate of PR #104). This helps your future self when you are auditing history six months from now.
- Click Abandon to confirm.
Once you do this, the PR status changes to Abandoned. It will disappear from the default “Active” lists, and no further build validations will run against it.
How to Delete the Source Branch (The Cleanup)
Abandoning the PR closes the request, but it does not delete the branch containing the code. If you want to truly clean up the mess, you need to delete the source branch as well.
This is the step most developers forget, leaving their repo cluttered with stale branches like feature/login-fix-v2-final-final.
- Go back to Repos > Branches.
- Find the branch you used for the PR (e.g.,
user/jdoe/fix-typo). - Hover over the row for that branch.
- Click the trash can icon (Delete branch).
Note: If you set a “Branch Policy” that prevents deletion, you might need to ask your Project Administrator to remove it for you.
Comparison: Active vs. Abandoned vs. Completed
To help you visualize the lifecycle, here is how the statuses compare:
| Feature | Active PR | Abandoned PR | Completed PR |
| Visibility | Default view (Active tab) | Hidden in “Abandoned” tab | Hidden in “Completed” tab |
| Code Status | Pending Merge | Not Merged | Merged |
| Audit History | Fully Visible | Retained in History | Retained in History |
| Can be Reactivated? | N/A | Yes | No (must revert) |
Permissions: Who Can Abandon a PR?
Not everyone can delete (abandon) every PR. Azure DevOps has a specific permission hierarchy.
- The Creator: If you created the PR, you can always abandon it.
- Reviewers: Generally, reviewers cannot abandon a PR unless they have higher permissions.
- Project Admins: Administrators with “Edit policies” or “Manage pull requests” permissions can abandon any PR in the repository.
If you are trying to clean up an old PR left behind by a former employee and the button is greyed out, you likely need to ask your Project Collection Administrator to grant you the “Contribute to pull requests” permission.
Conclusion
While you cannot hit a magic “Delete” button to delete a Pull Request from the database permanently, Abandoning is the functional equivalent for 99% of workflows. It stops the merge, cleans up your dashboard, and signals to the team that the code is dead.
You may also like the following articles:
- How to Abandon PR in Azure DevOps
- How to Create Pull Request in Azure DevOps
- Azure DevOps What Is It
- How to Resolve Merge Conflicts in Azure DevOps

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
