Remove GitHub’s “Ghost” Notifications

In September there seems to have been some blockchain spam repositories (see ycombinato, Git Coin) that tagged quite a few people, triggering GitHub notifications for those people. While GitHub reacted and removed the repositories, they didn’t mark those notifications as read. Additionally, the notification icon on GitHub seems to disregard notifications of deleted repositories, yet the notification list doesn’t list those notifications. This creates then creates so called “Ghost Notification” as there’s a discrepancy between the notification icon and the notification list.

Fortunately, there’s a way to still mark these notifications as read via GitHub’s API:

curl -L -X PUT \
    -H "Accept: application/vnd.github+json" \
    -H "Authorization: Bearer <CLASSIC TOKEN>" \
    -H "X-GitHub-Api-Version: 2022-11-28" \
    https://api.github.com/notifications \
    -d '{"last_read_at":"2025-09-28T00:00:00Z","read":true}'

This will mark all notifications older than the 28th of September 2025 as read, including those ghost notifications.

Note that you’ll need a classic access token, since the fine-grained tokens do not allow for querying GitHub notifications.

You can find more information about the GitHub API in their documentation.

It’s rather annoying that after weeks of those ghost notifications, GitHub hasn’t acted and marked them as read for everyone, so people have to now go and do these extra steps themselves.

Leave a Comment

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.