No need for defragging in Linux. Search as this is asked all the time which will provide you with more details why you don't need to defrag.
Temp files are most likely in /tmp. You can clear these out usually at anytime. Most distro's will usually clean these out upon shutdown or bootup, etc.
fsck is the tool used to check your filesystems. This will run every so often at startup.
man fsck for more details.