List runners to get their tokens and URLs:
sudo gitlab-runner listVerify with delete option specifying runner's token and URL:
sudo gitlab-runner verify --delete -t YMsSCHnjGssdmz1JRoxx -u http://git.xxxx.com/
How do I delete/unregister a GitLab runner - Stack Overflow
gitlab-runner commands lifecycle for restarting runner - Stack Overflow
Hide runner execution command
Can I stop/pause individual docker executor runners on a single machine?
List runners to get their tokens and URLs:
sudo gitlab-runner listVerify with delete option specifying runner's token and URL:
sudo gitlab-runner verify --delete -t YMsSCHnjGssdmz1JRoxx -u http://git.xxxx.com/
Get your runner token and id
First, go to the GitLab settings page and find the token (e.g. 250cff81 in the image below) and the id (e.g. 354472 in the image below) of the GitLab runner which you wish to delete.

Use the gitlab-runner CLI to unregister the runner
If you have access to the machine which was used to register the GitLab runner, you can unregister the runner using the following command, where you replace {TOKEN} with the token of your GitLab runner (e.g. 250cff81 in the example above).
gitlab-runner unregister --url https://gitlab.org/ --token {TOKEN}
Use the GitLab API to unregister the runner
If you no longer have access to the machine which was used to register the runner, or if the runner is associated with multiple projects, you can use the following Python script. Set RUNNER_ID to the id of your runner (e.g. 354472 in the example above) and GITLAB_AUTH_TOKEN to a GitLab token which you can generate from your profile page.
import os
import requests
GITLAB_AUTH_TOKEN = ...
RUNNER_ID = ...
headers = {"PRIVATE-TOKEN": GITLAB_AUTH_TOKEN}
r = requests.get(f"https://gitlab.com/api/v4/runners/{RUNNER_ID}", headers=headers)
runner_data = r.json()
for project in runner_data.get("projects", []):
r = requests.delete(
f"https://gitlab.com/api/v4/projects/{project['id']}/runners/{RUNNER_ID}",
headers=headers,
)
if not r.ok:
print("Encountered an error deleting runner from project:", r.json())
r = requests.delete(f"https://gitlab.com/api/v4/runners/{RUNNER_ID}", headers=headers)
if not r.ok:
print("Encountered an error deleting runner:", r.json())
Hi, i try to find it on gitlab documentation but i can't find anything.. i want to hide, in the gitlab-ci UI visualization, all the lines in the gitlab-ci.yml files and see only the output of these commands.. basically, i want to hide all the green lines started with "$" .
How i can achieve this??
Thanks
Make sure that you're using the entire SHA, not the partial one listed on the Gitlab CI runners list.
This can be found by running sudo gitlab-runner list on the machine with the runner installed.
If you've already removed the runner in the gitlab runners page, it will still be present on the gitlab-runner machine (check with the command sudo gitlab-runner list).
You can then unregister it from the config.toml using the command:
gitlab-runner verify --delete
Or manually, by running:
sudo gitlab-runner stopsudo vi /etc/gitlab-runner/config.toml# update the runners sectionsudo gitlab-runner start
For MacOS and Ubuntu
If you have already removed it from the Runners section in your project settings then you are no longer be able to unregister with command. Then what you can do is to delete them from your host as below:
gitlab-runner verify --delete
This will remove all the unregistered/removed runners from your host machine and will update config.toml file.
If you haven't removed it from Runners section in your project settings(Settings -> CI/CD -> Runners), then you can unregister it from your host like below:
gitlab-runner unregister runner_id/name
or unregister all runners,
gitlab-runner unregister --all-runners
Hope this will help to somebody. cheers !!!