Results 1 to 7 of 7
  1. #1
    Join Date
    May 2009
    Location
    US
    Posts
    2,502

    Is it safe to remove all of /tmp?

    My /tmp on my cPanel hosting server is nearly full, and I was wondering if it is safe to remove all the contents in /tmp, if not, what can I delete to clear up the space?

    Thank you!

  2. #2
    Lol no you're not going to want to delete everything in your tmp folder. You need to keep things such as mysql.sock and aquota.user/quota.user.

    Do the followingin SSH to see what is so big and then more then likely it will be safe to delete that.

    cd /tmp
    ls -lh
    Do you have eaccelerator installed or something? If you do, I've noticed eaccelerator seems to not clear its cache from the tmp folder and just seems to leave it there. You can create a crontab to empty the eaccelerator folder if your tmp folder fills up often and it is because of this.

  3. #3
    Hello,

    You can remove the session files from /tmp.

    Find files with ownership nobody and delete them.

    Thank you

  4. #4
    Yes, you can delete the sess files from the /tmp folder by using,

    # cd /tmp

    # rm -rf sess_*

    but before using this command, make sure that you are in the /tmp directory.
    Support Facility | 24/7 web hosting technical support services
    Technical support | Server management | Data migration

    Technical Articles

  5. #5
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    11,686
    Nothing in tmp should ever be permanent so theoretically it is safe yes.

    Tmp shouldn't have or need a quota set up as it is entirely too small for it

  6. #6
    Join Date
    May 2009
    Location
    US
    Posts
    2,502
    Thanks guys! Removing the session files worked like a charm!

  7. #7
    Join Date
    Oct 2006
    Location
    India
    Posts
    62
    Hi,

    You may need to use a command called tmpwatch which removes files which haven’t been accessed for a period of time. Normally, it’s used to clean up directories which are used for temporary holding space such as /tmp.

    Following code will remove all files/dirs from /tmp if they are not accessed in last 2 weeks (24 * 14 days = 336)

    tmpwatch --mtime --all 336 /tmp
    Sony Koithara ,
    CrazyAdmins.com
    -> where admins go c r @ z y!!!

Similar Threads

  1. Safe to have FireFox safe your passwords?
    By Frosty in forum Computers and Peripherals
    Replies: 9
    Last Post: 04-24-2007, 10:44 AM
  2. AllowOverRide All - safe, not safe, what?
    By Jcink in forum Hosting Security and Technology
    Replies: 3
    Last Post: 05-19-2006, 11:30 AM
  3. Services safe to remove
    By BootsSiR in forum Hosting Security and Technology
    Replies: 8
    Last Post: 03-17-2004, 09:59 AM
  4. Replies: 9
    Last Post: 03-15-2004, 06:20 AM
  5. remove.org
    By Bashar in forum Web Hosting Lounge
    Replies: 0
    Last Post: 08-04-2003, 04:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •