2020-06-03 21:08:23 +00:00
---
stage: Enablement
group: Geo
2020-11-26 06:09:20 +00:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-06-03 21:08:23 +00:00
type: howto
---
2019-07-08 08:50:38 +00:00
# Removing secondary Geo nodes **(PREMIUM ONLY)**
2019-05-05 16:08:21 +00:00
**Secondary** nodes can be removed from the Geo cluster using the Geo admin page of the **primary** node. To remove a **secondary** node:
2020-07-30 00:09:53 +00:00
1. Navigate to **Admin Area > Geo** (`/admin/geo/nodes`).
2019-05-05 16:08:21 +00:00
1. Click the **Remove** button for the **secondary** node you want to remove.
1. Confirm by clicking **Remove** when the prompt appears.
Once removed from the Geo admin page, you must stop and uninstall the **secondary** node:
1. On the **secondary** node, stop GitLab:
2020-01-30 15:09:15 +00:00
```shell
2019-07-03 01:37:27 +00:00
sudo gitlab-ctl stop
```
2019-05-05 16:08:21 +00:00
1. On the **secondary** node, uninstall GitLab:
2020-01-30 15:09:15 +00:00
```shell
2019-07-03 01:37:27 +00:00
# Stop gitlab and remove its supervision process
sudo gitlab-ctl uninstall
2019-07-12 08:15:38 +00:00
2019-07-03 01:37:27 +00:00
# Debian/Ubuntu
sudo dpkg --remove gitlab-ee
2019-07-12 08:15:38 +00:00
2019-07-03 01:37:27 +00:00
# Redhat/Centos
sudo rpm --erase gitlab-ee
```
2019-05-05 16:08:21 +00:00
Once GitLab has been uninstalled from the **secondary** node, the replication slot must be dropped from the **primary** node's database as follows:
1. On the **primary** node, start a PostgreSQL console session:
2020-01-30 15:09:15 +00:00
```shell
2019-07-12 08:15:38 +00:00
sudo gitlab-psql
2019-07-03 01:37:27 +00:00
```
2019-07-12 08:15:38 +00:00
2020-12-04 21:09:29 +00:00
NOTE:
2019-07-03 01:37:27 +00:00
Using `gitlab-rails dbconsole` will not work, because managing replication slots requires superuser permissions.
2019-05-05 16:08:21 +00:00
1. Find the name of the relevant replication slot. This is the slot that is specified with `--slot-name` when running the replicate command: `gitlab-ctl replicate-geo-database` .
2019-07-03 01:37:27 +00:00
```sql
SELECT * FROM pg_replication_slots;
```
2019-07-12 08:15:38 +00:00
2019-05-05 16:08:21 +00:00
1. Remove the replication slot for the **secondary** node:
2019-07-03 01:37:27 +00:00
```sql
SELECT pg_drop_replication_slot('< name_of_slot > ');
2019-07-12 08:15:38 +00:00
```