If you want to clear your temp files (they live in /tmp in most distributions) it is indeed possible and necessary as Uncle_Theodore said... not all delete when the program exits. I however find you shouldn't need to do this often... it's been years for me, but then again, I completely reinstall (except home) every time I upgrade to a new version of Ubuntu.
If and when you do.... DO NOT delete the temp folder... else you're going to have to play with the command line to fire up X again. Just delete the contents of the folder. I will assume you're using Ubuntu:
Just select everything in the folder and hit delete. Be careful though, I don't really see why you should need to do this- and it is possible to delete something you need and then screw everything up.