Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm kinda pretty new to this but anyone know how to delete any temp and log files or these kind of files on vps with terminal? I'm runnin debian on the vps. I'm troubled since I can't locate those files.

share|improve this question
What kind of temp and log files are you worried about? Is it e.g. your browser's cache, or files created by other programs you run? – Jenny D Feb 5 '14 at 14:37

On a debian based machine temporary and log files are probably in


or some subdirectory of those paths. However there is no guarantee that a program writes them there. To remove them you probably need root privileges and use rm.

share|improve this answer
thanks for the info – Noa May 1 '13 at 12:48

May be you can try Blechbit application its a package manager from synaptic, download it then follow the below tips....

open terminal>> Login by su and password..

type bleachbit as it will be launched as a root login .Now you can select all ‘cache’ from all your browsers and other non-essential files or anu log you want to delete and hit ‘delete’ it ll remove the log...

Or Find the log file whr its been generated, then rm -rf logs file... thats it.. You can find the log file location in the conf file of your application..

share|improve this answer
thanks for the info! since i'm using putty to connect I must type the command to delete them – Noa May 1 '13 at 12:49

then you can try 2nd option.. can find the log file and rm -rf the log file..

rm -rf = delete rm = Remove specified files or directories. -rf is the option but use this command carefully as it is very powerfull command if u delete any system file, Your system may stuck..

share|improve this answer
DO NOT recommend using rm -rf without knowing what it does and what the arguments mean! – Jenny D Feb 5 '14 at 14:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.