If we assume the variable _trackID equals the track ID of the track you want to uncache, then you would do this:
<<set _tracks = Macro.get("cacheaudio").tracks>>
<<if _tracks.hasOwnProperty(_trackID)>>
<<if _tracks[_trackID].audio.duration>>
<<run alert('Error: Cannot uncache track "' + _trackID + '". Track currently queued for playing.')>>
<<else>>
<<run _tracks[_trackID].destroy()>>
<</if>>
<<else>>
<<run alert('Error: Track "' + _trackID + '" not found.')>>
<</if>>
That will display error popups if you attempt to delete a track that doesn't exist or a track that is currently queued for playing (currently playing or paused). You can swap out those "alert" lines for your own error handling method if you prefer.
Note that this may not immediately free up that memory, however, it should make that memory available for JavaScript garbage collection.
Hope that helps! :-)
[Note: I haven't tested the above code, but I believe it should work.]