Gerrit does not have a feature of deleting project by default. You need to delete repository and cache manually. The delete-project plugin adds a feature of deleting project. This article will describe installing delete-project plugin and deleting project with delete-project plugin.
Table of Contents
1 Install delete-project plugin
Download delete-project.jar from plugin-delete-project in gerrit-ci. Copy delete-project.jar to Gerrit plugins directory and restart Gerrit.
$ sudo cp delete-project.jar /var/gerrit/plugins/ $ sudo chown gerrit:gerrit /var/gerrit/plugins/delete-project.jar $ sudo systemctl restart gerrit
2 Delete project via web interface
After adding delete-project plugin, "Delete" button is added to "Projects Commands" in project setting page. Deleting project needs Administrators group.
3 Delete project via CLI
- Register SSH public key in user setting page. Deleting project needs Administrators group.
- While creating project is "gerrit create-project", deletinig project is "deleteproject delete".
- –force option will delete project which has an opened patch set.
$ ssh -q -p 29418 <server> deleteproject delete \ --force --yes-really-delete <project>