Removing stale GitHub notifications
Recently, I got mentioned in GitHub issues of repositories that were deleted/removed before I was even able to remove the notifications I got from them.
It seems like those repositories were part of a phishing campaign (see Tell HN: Phishing campaign claiming to be GitHub Developer Fund).
Unfortunately, there is no option to get rid of notifications of deleted repositories via the UI (yet?), as they are not shown in the list:
There is a simple workaround though:
a) Go to the "New personal access token (PAT)" page: https://github.com/settings/tokens/new
b) Give your token a name (e.g., "Remove stale notifications").
c) Check the "notifications" scope (= "Access notifications").
d) Click "Generate token" and copy the token.
e) Set last_read_at
and <YOUR_NOTIFICATION_PAT>
to match your needs and mark all notifications as read with the following curl command:
curl -X PUT \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token <YOUR_NOTIFICATION_PAT>" \
https://api.github.com/notifications \
-d '{"last_read_at":"2025-09-25T15:00:00Z"}'
After executing the command, all notifications before the last_read_at
timestamp are marked as read (see GitHub API docs) and the stale notifications disappear.
Hope this helps!
Further resources: