How to Remove a Server
After using Plex Media Server for several years you may have upgraded or changed servers. When you do this, Plex doesn't automatically remove the old server - that is something that will need to be done manually.
The good news is that it is easy to remove, or unauthorize, servers that are no longer in use. Let's look at the steps involved in removing a server.
Why would you want to remove a server from Plex?
There are a few reasons you would want to remove a server from your Plex account.
The first reason was discussed above. You may want to upgrade your Plex server, which may require you to move your server to a new system. When you do this, the old server will still be authorized in your Plex account. You will want to remove this server from your account once it is no longer in use.
The second reason would be if your Plex server was compromised in some way. Removing the compromised server from your account will prevent any bad actors from accessing your Plex account.
There could be other reasons you would like to remove a server from your account, in addition to the above reasons. To remove a server from Plex, you can use the steps outlined in the next section.
How to Remove a Server from Plex
Removing a server from your Plex account is very similar to removing a device.
If you would like to remove a server from your Plex account, you can use the following steps:
- Log into your Plex server as an administrator, and then click the Settings - the wrench - link in the upper-right corner of the Plex server page.
- From the menu on the left, click the Authorized Devices option in your account section.
- Using the filter at the top of the Authorized Devices page, select Server from the list. By default, All is selected.
- Click the red 'X' associated with the server you would like to remove.
- The Remove Server confirmation message will appear, click the Remove button to confirm the server removal.
- Another final confirmation will be displayed. Click the Yes, I'm Sure button.
At this point, the server has been removed from your Plex account. If you launch Plex on the server that was deleted, you can get one of two messages:
- The server is unclaimed and not secure:
- An Invalid credentials message:
If you would like to re-add the server, then you will need to re-claim the server again.
Remove a server from Plex using the API
While I recommend you use the method in the previous section to remove a Plex server from your account, you can also use the plex.tv API.
This is an advanced method, and may lead to unpredictable results if not done correctly. Since this isn't the normal method of removing a server, there is no support if something does go wrong, such as removing the wrong server or device from your account.
If you would like to use the API to remove a server, you will need to use either an administrative account Plex token, or a device Plex token.
Once you have your Plex token, you can follow these steps to remove a Plex server using the API:
- Get a list of authorized devices using the following API request, and copy the value of the
id
attribute for the server you would like to remove:GET https://plex.tv/devices.xml?X-Plex-Token={plex_token}
- Using the server ID from the previous step, remove the server from your Plex account:
DELETE https://plex.tv/devices/{server_id}.xml?X-Plex-Token={plex_token}
- Stop the Plex Media Server for the server to be removed from your account. If you restart the server, you will notice that it will no longer be authorized to your account.
Once the requests are made, you will get one of the following response status codes indicating the result:
HTTP Code | Description |
---|---|
200 | Success. The request was successful. |
401 | Unauthorized. The Plex token used to make the request is not authorized to remove the server. |