How to delete external storage files when uninstalling the app?

Hi, I am developing an ionic app with cordova file plugin.
In this app, user can download files(images,audios,text…) from server then store it in the external storage (ex, for android, “externalRootDirectory/appName”).
And I prefer these files can be removed when uninstalling the app.
Anyone have an idea?