OS X 10.8 and later. Apple Music stores the audio files it plays in ~/Library/Caches/com.apple.iTunes/SubscriptionPlayCache/. This script will simply delete that folder.
The files in this folder are specially protected audio files that are downloaded and cached when you play a track from Apple Music on your Mac. They can't be user-played and are only useful to Apple Music, ostensibly so iTunes doesn't have to re-download them if they are played again. (This cache folder doesn't pertain to Radio music. Or to Apple Music you've added to your library for offline listening, the files of which are stored in your "iTunes Media" folder.)
Be sure to also see View Cached Music, a free app that lists track information about the Apple Music files cached on your computer.
About 1GB per 100 files or so.
Perhaps Also of Interest...
downloaded 4m 23s ago
Sort purchased tracks into discrete playlists by name or Apple ID
downloaded 2h 14m 43s ago
Change file type to make selected AACs bookmarkable
downloaded 2h 14m 49s ago
Perform search-and-replace on text in your choice of tags
downloaded 2h 15m 2s ago
Set choice of various number tags of selected tracks incrementally
downloaded 2h 15m 10s ago
Append user-entered text to beginning or ending of selected tag of each selected track
downloaded 2h 15m 25s ago
Applet assists with swapping, copying, appending data between track tags