DEV Community

rndmh3ro
rndmh3ro

Posted on • Originally published at zufallsheld.de on

TIL how to archive all projects in a Gitlab group

Gitlab does not yet allow archiving all projects in a group at once. To do this, you can either manually archive every project in the frontend, our you can do it via the API. Here’s an API-call to archive all projects within a group (using the gitlab-cli).

for id in $(glab api groups/:project_id/projects | jq .[].id); do glab api -X POST /projects/$id/archive; done

Enter fullscreen mode Exit fullscreen mode

Just replace :project_id with the ID of your group and run the command.

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more