You don't “erase” – you delete the title and its save data via Data Management.
.app files remain on SD. To fully wipe, format SD (Settings → Other Settings → Format SD Card) – erases all SD data.Redownload owned eShop titles anytime from “Redownload” in eShop (while servers last).