See this post: Library.db size more than doubled in latest version - #410 by OttoKerner
Save the formatted text as a .bat file (repair.bat, deflate.bat, etc.), then stop Plex Media Server and run the bat file from a CMD prompt (c:).
You can click in the upper right corner of the text box to copy everything to the dashboard. Then paste it into a text file, save it, and rename it to end in .bat instead of .txt.
Plex Media Server must be stopped when you run the file. Do not stop the cleaning process once it starts. It may take an hour or more to complete. When finished, the com.plexapp.plugins.library.db file will be its normal size.
Then start Plex Media Server and make sure it is working OK. When you comfortable Plex is OK, you can delete the backup database files (the files with the dates appended).
Additional information is in the (very long) thread linked above. The first post has a short summary and links to the detailed information.