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 58s ago
Copy Artist to Album Artist of selected tracks
downloaded 23m 47s ago
Exports and then re-imports selected tracks' artwork
downloaded 23m 59s ago
Gather audio tracks whose files contain no artwork metadata
downloaded 43m 48s ago
Apply selected CD's CD Text to its disc and track tags
downloaded 44m 2s ago
Use tag info from selected track to search Amazon Books for cover art
downloaded 46m 4s ago
Move selected playlists to a new or existing folder