In my Joomla component I have a bunch of Javascript files in media
that change on update ( basically a compiled Angular app ) and because of the way the system is structured, I need to only have the current files in the folder. However when I install my component as an update, it leaves the old files in the media/com_mycomponent
folder.
What is the best way to clear out the old files during installation?