You can format an SD card using Windows, Mac, and Android devices, and likely your digital camera too.
You can clear the entire cache on your Samsung Galaxy phone, or clear only the cache for a specific app. Here's a guide on how to do both.