Version Control System (VSC)

How to unregister a GitLab Runner


ThhGitLab Runner is an open-source project that is used to run your CI/CD jobs and send the results back to GitLab. It can be run as a single binary; no language-specific requirements are needed. You can choose to install the GitLab Runner application on the infrastructure that you own or manage. If you do, you should install GitLab Runner on a machine that’s separate from the one that hosts the GitLab instance for security and performance reasons. Here are some related guides: How to install Git on macOS, How to uninstall Git on macOS, Practical Git use with markdown, how to clone a repository and install software from GitHub on Windows, how to use AWS CodeCommit, Azure DevOps and GitHub integration for Docker and Kubernetes deployment, and how to build your first CI/CD Pipeline in Azure DevOps using ASP.Net Core Application.

This operation cannot be undone. It updates the configuration file, so make sure to have a backup of config.toml before executing (un-registering) it. 

Use the GitLab-runner CLI to unregister the runner

You can only add a single instance of GitLab runner to a system. This registered runner is added to the configuration file. But the interesting part of this is that you can use multiple configurations in a single installation of GitLab Runner. Executing gitlab-runner register adds a new configuration entry. It doesn’t remove the previous ones.

By URL and token: To unregister a specific runner, first, get the runner’s details by executing the following command below.

gitlab-runner list

If you have access to the device which was used to register the GitLab runner, you can unregister the runner using the following command, where you replace the {TOKEN} with the token of your GitLab runner (e.g. 250cff67 in the example above)

gitlab-runner unregister --url --token {TOKEN}

By name: It is worth noting that if there is more than one runner with the given name, only the first one is removed.

gitlab-runner unregister --name test-runner

All runners: You can also unregister all runners by using the command below.

gitlab-runner unregister --all-runners

The following commands allow you to manage the runner as a system or user service. Use them to install, uninstall, start, and stop the runner service. Kindly refer to these related guides on how to uninstall GitLab from your Windows device, and how to install, register and start GitLab Runner on Windows.

gitlab-runner install
gitlab-runner uninstall
gitlab-runner start
gitlab-runner stop
gitlab-runner restart
gitlab-runner status

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x