Playlists (batch deleting, music.app)
You cannot batch select (holding the shift or option key) to delete playlists from the side bar. You have to delete them one by one. Try this AppleScript instead:
tell application "Music"
set playlistList to (get playlists)
repeat with p in playlistList
try
if (name of p) is not "Library" then
delete p
end if
end try
end repeat
end tell
Make sure you're backed up! But it worked like a charm for me.
Mac mini, macOS 15.3