UPDATED: Delete Empty Playlists v4.4
For macOS 10.15 and later only. This script will list the empty user-created playlists in the Music app and can delete all or just a selection of them.
NOTE: A bug in the current version of Music prevents the complete removal of playlists from the Sidebar UI (when they are deleted via an AppleScript like this one) until the Music app has been quit and re-started.
Latest version:
- Additional accommodations for macOS 11 Big Sur
More information for Delete Empty Playlists v4.4 and download link is here.