Server Version#: 1.27.0.5897
Player Version#:1.46.1.3056-ab91bdc0
Is there any way to clear/purge play history? I have several shows/movies with iplay history from 2019 where the movie/episode is marked as played several times with the same timestamp. Even better is there a way to clear/purge play history for individual movies/shows? I do NOT want to clear the watched/unwatched status.
You can do that in Plex Dash.
e.g. search the movie/episode, show its watch history and remove the unwanted entries (swiping the entry to the left will show the Delete option).
Thanks very much! My plex is running on Ubuntu 22.04 so I used:
/usr/lib/plexmediaserver/Plex\ SQLite
sqlite> .open ‘/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db’
sqlite> select id, name from accounts;
THEN
sqlite > DELETE FROM media_item_settings WHERE account_id = x;
sqlite > DELETE FROM media_part_settings WHERE account_id = x;
sqlite > DELETE FROM media_stream_settings WHERE account_id = x;
sqlite > DELETE FROM metadata_item_accounts WHERE account_id = x;
sqlite > DELETE FROM metadata_item_settings WHERE account_id = x;
sqlite > DELETE FROM metadata_item_views WHERE account_id = x;
sqlite > DELETE FROM play_queues WHERE account_id = x;
sqlite > DELETE FROM plugin_permissions WHERE account_id = x;
sqlite > DELETE FROM statistics_bandwidth WHERE account_id = x;
sqlite > DELETE FROM statistics_media WHERE account_id = x;
sqlite > DELETE FROM view_settings WHERE account_id = x;
Worked great. All play history for the deleted accounts has been removed. Plex still running
Now, I’m wondering if I can remove those deleted accounts from the accounts table …
sudo service plexmediaserver stop
sudo bash
/usr/lib/plexmediaserver/Plex\ SQLite
sqlite>.open ‘/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db’
sqlite> select id, name from accounts;
sqlite> DELETE FROM accounts WHERE id = x;
sqlite> .exit
sudo service plexmediaserver start
Accounts I deleted are gone from the “All Users” drop down in the dashboard & play history.