When you remove media files or directories from your server and perform a scan, Plex will typically remove the items from the media library. If you have disabled Plex from automatically emptying trash after each scan, then you will have orphan items in your Plex server.
You can manually empty the trash in Plex by using this API command.
This command is the same API command used by the Empty Trash option in Plex.
PUT http://[IP address]:32400/library/sections/[Library ID]/empty Trash?X-Plex-Token=[PlexToken]
|IP address||The IP address of the Plex Media server.|
|PlexToken||The temporary authentication Plex token.|
|Library ID||The key associated with a library. This key can be found by calling the Libraries API command.|
|200||Success - The request was successful.|
|401||Unauthorized - The Plex token provided was not valid.|
No response is returned. You will be able to see the empty trash API command run from the Plex console.
The empty trash command will need to run for each library in your Plex server.
Run the empty trash command for the library with ID 7 on a Plex server located at IP address of 192.168.1.4: