Very long thread on the topic: Library.db size more than doubled in latest version
Earlier versions of 1.41.7 have a bug resulting in massive database growth.
You can either (a) fall back to a database backup, or (b) manually remove the unnecessary data from the database file.
The thread mentions multiple options to delete the data.
This worked on my PC: Library.db size more than doubled in latest version - #186 by FordGuy61
This option does the same thing and appears to be much faster: Library.db size more than doubled in latest version - #188 by hlve