We can go for delete activity to delete entire folder. but my concern it will remove the extensions as well i guess. i have tried at my end it removed the UiPath web automation extension from my chrome browser. Not good idea i guess.
I could see that userdata contains so many folders but we have to find out the exact folder for history so that we can delete that one alone or look for some other way.