Delete a closed pull request from GitHub
Solution 1
There is no way you can delete a pull request yourself -- you and the repo owner (and all users with push access to it) can close it, but it will remain in the log. This is part of the philosophy of not denying/hiding what happened during development.
However, if there are critical reasons for deleting it (this is mainly violation of Github Terms of Service), Github support staff will delete it for you.
Whether or not they are willing to delete your PR for you is something you can easily ask them, just drop them an email at [email protected]
UPDATE: Currently Github requires support requests to be created here: https://support.github.com/contact
Solution 2
5 step to do what you want if you made the pull request from a forked repository:
- reopen the pull request
- checkout to the branch which you made the pull request
- reset commit to the last master commit(that means remove all you new code). Command:
git reset --hard commit_hash_here
git push --force
- delete your forked repository which made the pull request
And everything is done, good luck!
Solution 3
This is the reply I received from Github when I asked them to delete a pull request:
"Thanks for getting in touch! Pull requests can't be deleted through the UI at the moment and we'll only delete pull requests when they contain sensitive information like passwords or other credentials."
Solution 4
It's very easy actually:
You can empty it, that's the best you could do.
-
Go to your local
-
Copy your local branch
unwanted-branch
(against which the PR was opened) to a new branchnew-branch
. This copying is relevant if you want to back it up for any reason. Otherwise go to step 3.$ git branch -b new-branch
$ git merge unwanted-branch
$ git push
-
Empty the
unwanted-branch
$ git checkout unwanted-branch
-
$ git reset --hard HEAD~n
#n is the number of commit the branch has
$ git push -f
Enjoy, your PR is empty and closed now ;). Go to remote and delete the unwanted-branch if it bothers you.
Related videos on Youtube

Aristona
Hi there! I'm Anıl and I live in Kastamonu, Turkey. Although my main expertise is on the backend, I usually do frontend, mobile development and game development too.
Updated on January 06, 2022Comments
-
Aristona 12 months
I accidentally made a wrong pull request and ended up closing the request myself. It's in a closed state right now but it's accessible via direct URL and showing on my activity bar.
Is there any way to delete a pull request completely so it's no longer accessible via URL or shows up on your activity history?
-
Eugene Ryzhikov over 9 yearsNo. You can only close it.
-
random over 9 yearsGitHub account and UI related questions are better for WebApps.StackExchange.com or directly to their support
-
Machta almost 6 yearsYou can get rid off all pull requests (and other things like LFS files) by deleting and recreating the repository. Most of the time you cannot afford this but it can help if you mess up early on.
-
RichieHH almost 3 yearsGreat Q and another victim of the SO mandarins. Great answers too.
-
-
Yousha Aleayoub about 5 yearsThey(Github staff) only delete pull requests that contain sensitive data.
-
Justin Domnitz over 4 yearsSome useful information: help.github.com/articles/… "... you can permanently remove all of your repository's cached views and pull requests on GitHub by contacting GitHub Support."
-
Erik Aronesty over 3 yearsSo sad. I submit a bad PR about once every week because I'm maintaining a forked repo and the default PR is to the head. At some point we'll need to branch off from the mai, but for now... zillion closed pr's
-
MaXi32 about 3 yearsI know this is an old question but have you tried delete your github account and re-create it? From the documentation, when you delete your account, github said you automatically delete all your pull request made in other repository. But this means you have to start your "new life" on github. I think this is the only way. Hopefuly someone open this question and put this answer below.
-
Marc.2377 about 3 yearsFor what it's worth, I contacted GitHub support today to request deletion of a PR that was submitted by mistake to another repository where I'm an admin. They deleted it for me and were super nice. :)
-
Neel over 2 yearsGuess I'll have to add my SSN + date of birth to get this PR deleted :(
-
joel over 2 yearsI assume that's a GitHub philosophy, since you can delete that info in git
-
slajma about 2 yearsThis works even if the repo is not a fork. Just make sure you back up the branch first.
-
Ishan Jain over 1 yearThis does not actually delete the PR. It simply closes the PR and the PR still remains visible in logs
-
Darshan L over 1 yearAn important point in this approach is to make sure you reopen the PR before you force push. ie step1 is a must before you go to next step. Otherwise, once you have force pushed your changes, you cant reopen the PR. If in case, you didnt perform step1 and force pushed, still you can reopen with tedious workaround - github.com/isaacs/github/issues/361#issuecomment-219088644
-
kamae about 1 yearIt did not work even though I followed the steps including the step 1. The PR becomes just a
closed
state and still listed in the closed PR list. -
kyakya about 1 yearsupport.github.com/request >> Remove data from a repository I own or control >> Remove pull requests
-
Yılmaz Alpaslan 11 monthsThis empties the PR in case sensitive data was publishes with the PR, but OP wants to completely delete the PR in both contribution activity and closed PRs list of the repository. Apparently it's not possible to do so.
-
edam 11 monthsYes, git ethics won't allow it.
-
Ordoshsen 9 monthsgit has no problem with deleting branches or commits. It's GitHub that won't allow deleting PRs here.
-
internetdotcom 9 monthsSo the solution for this missing feature is to edit a pull request to add a social security number to it -- it may not have to be your own!
-
Jonatan Cloutier 7 monthsThis is not working, even for just removing content, although the pr look empty, you can still compare the force push "commit diff"