How to remove deleted commits

we have a git repo that hosted by phabricator and recently we have to run a git filter-branch command against the repo to rewrite all user’s email from old domain to a new domain, then we push the new commits back to phabricator. After this rewrite, we found the search result contains both the old and new (altered) commits. When user click the link, old commits are still accessible via web with a “This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.” warning.

Most users find it’s annoying as the search result contains duplicates record, is it possible to cleanup these old commits safely?