UPDATED: Delete Empty Playlists v4.2
For macOS 10.15 Catalina 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 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:
- Fixed error reading playlist info that prevented launch progress
More information for Delete Empty Playlists v4.2 and download link is here.