Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-01-2006, 07:45 PM   #1
Senior Member
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85

Does files in the /tmp getting deleted automaticall? I am guessing they do because it is a temporary directory, but I do not know for sure. How often do files get deleted from /tmp? I noticed my downloaded files from Firefox go there if I choose to open instead of save.
Old 08-01-2006, 08:30 PM   #2
Registered: Sep 2004
Location: India
Distribution: Kubuntu, Archlinux, Suse, Gentoo, Mandrake
Posts: 371

Rep: Reputation: 30
No. None of the files get automatically deleted. There are two ways when they get deleted without user interaction:
1. The program keeps track of what files are created and deletes it prior to exit. Such as firefox, etc.
2. Many distros add this into their runlevel scripts to clear the /tmp directory. (I know of Gentoo for sure, other must have it too.)

Otherwise you need to delete it yourself. For example, if you run KDE, there should be some files or directories in the /tmp (ksocket-username etc.), which you may need to delete yourself.

Last edited by anupamsr; 08-01-2006 at 08:38 PM.
Old 08-01-2006, 08:34 PM   #3
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
AFAIK, files in /tmp get deleted when you reboot your computer. They may also get deleted periodically, but I am not sure about that. The same goes for other temporary locations, such as /usr/tmp

I hope this helps
Old 08-01-2006, 08:59 PM   #4
Senior Member
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
you can however mount /tmp as tmpfs so that files are automatically deleted after shutdown or reboot.

mount -t tmpfs none /tmp
remember however that mounting /tmp as tmpfs consumes memory for every file that's added to it.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
kde, /tmp, /var/tmp and all that garba Linux - Software 4 06-17-2005 12:31 PM
Create file using 'touch ./tmp.$$', file tmp.3941 is created, why? huangyanfeng Linux - General 1 04-13-2004 03:36 AM
"/tmp/sv001.tmp/setup.bin" error while installing OO1.1.0 Choey Linux - Software 0 09-16-2003 04:52 PM
Numerous scb_*.tmp files in /tmp dburk Programming 3 08-18-2003 04:28 PM
Newbie question - /tmp /var/tmp Mr happy Linux - Security 3 01-27-2003 01:03 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:50 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration