There's no "defragmenting" with an android phone's storage. if you could answer I'd ask why you think you need to do this.
If you want to start clean, back up your important data, do a factory reset, then reinstall and restore the stuff you want. That's the closest I can come up with.