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

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

Related posts: