(Most) of the other answers work.
But: When you are are running a self-hosted gitlab they are not complete.
The repo will not deleted, but only marked as deleted and hidden.
The full solution:
(This is for gitlab 14.8.4, other versions might have some tiny differences)
First let the site forget about it:
- Open the project on your gitlab site
- Navigate to: Settings > General
- Click Expand next to the Advanced section
- At the bottom of the page choose Delete project
Gitlab will mark it as deleted and after a couple of minutes a part, but not everything, will be "really" deleted.
After waiting a couple of minutes delete everything that has not been completely deleted:
- Open a terminal and search the first 4 hexadecimal chars of the git repo:
find /var/opt/gitlab/ | perl -ne 'print "$1\n" if(/^.*hashed\/(.{5}).*\+deleted\.git$/)' | sort | uniq
(Let's assume the output is e6/29
for example)
- Double-check if you don't have another repo that starts with the same 4 chars:
ls /var/opt/gitlab/git-data/repositories/+gitaly/state/@hashed/e6/29
(Every line should contain the same long hexadecimal string)
- Delete everything gitlab didn't delete yet:
(Some of the dirs might not exist. It depends on how you create your project)
rm -rf /var/opt/gitlab/git-data/repositories/+gitaly/state/@hashed/e6/29
rm -rf /var/opt/gitlab/git-data/repositories/@hashed/e6/29
rm -rf /var/opt/gitlab/gitlab-rails/shared/tmp/gitlab_exports/@hashed/e6/29