Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions docs/admin/how-to/remove-repo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,3 @@ Alternately, if a repository is synced from multiple code host connections you m
Open the repository's `Settings` page on Sourcegraph and from the `Mirroring` tab click `Reclone`.

![Reclone repository](https://storage.googleapis.com/sourcegraph-assets/docs/images/admin/how-to/reclone-repo.png)

## Manually purge deleted repository data from disk

After a repository is deleted from Sourcegraph in the database, its data still remains on disk on gitserver so that in the event the repository is added again it doesn't need to be recloned. These repos are automatically removed when disk space is low on gitserver. However, it is possible to manually trigger removal of deleted repos in the following way:

**NOTE:** This is not available on Docker Compose deployments.

1. Browse to Site Admin -> Instrumentation -> Repo Updater -> Manual Repo Purge
2. You'll be at a url similar to `https://sourcegraph-instance/-/debug/proxies/repo-updater/manual-purge`
3. You need to specify a limit parameter which specifies the upper limit to the number of repos that will be removed, for example: `https://sourcegraph-instance/-/debug/proxies/repo-updater/manual-purge?limit=1000`
4. This will trigger a background process to delete up to `limit` repos, rate limited at 1 per second.

It's possible to see the number of repos that can be cleaned up on disk in Grafana using this query:

```
max(src_repoupdater_purgeable_repos)
```