System Administration
Showing results for 
Search instead for 
Did you mean: 

File system is going to full :: /usr, /var and /tmp

Go to solution
Regular Advisor

File system is going to full :: /usr, /var and /tmp

Above mention file system is going to full and want to delete unused contents to reclaim some space.Following is snap of mention file system

/dev/vg00/lvol8 10256384 8375072 1867088 82% /var
/dev/vg00/lvol7 8192000 6319016 1858416 77% /usr
/dev/vg00/lvol4 5144576 3936160 1202408 77% /tmp

Modris Bremze
Esteemed Contributor

Re: File system is going to full :: /usr, /var and /tmp

And what's stopping you from doing that? All file systems still have at least 1 GB+ free space. You didn't mention if the system in question is HP-UX or Linux.
Honored Contributor

Re: File system is going to full :: /usr, /var and /tmp

Is this a HP-UX or Linux system?

The following advice should be applicable to both:

/dev/vg00/lvol8 10256384 8375072 1867088 82% /var

- In /var/tmp, anything older than the current system uptime can usually be safely deleted.

- Look into sub-directories of /var/spool/:
-- if there are many files in /var/spool/mqueue, your system has/had a problem in sending email messages to other systems, *and* you probably don't have a sendmail daemon running.

If you have disabled the sendmail daemon but are using cron or other system features that might send email, make a cron job that runs "sendmail -q" every 30 minutes or so.

-- if there are many large files in printing system hierarchy (/var/spool/lp in HP-UX, usually /var/spool/cups in modern Linux), check your print queues. If you have print jobs in queues that no longer have a working printer attached, disable those queues and remove the jobs using the management commands of the printing system (cancel/lprm). Consider removing any old non-functional print queues.


/dev/vg00/lvol4 5144576 3936160 1202408 77% /tmp

- Anything in /tmp that is older than the current system uptime can be safely deleted.

(Unless you have people on your system that would store important documents in Recycle Bin if using Windows...)

/dev/vg00/lvol7 8192000 6319016 1858416 77% /usr

The data in the /usr filesystem should not grow at all unless you're installing some new software. If it's growing, some software has been configured to write into an inappropriate location. Find it and fix. Look for new or recently-modified files:
find /usr -mtime -10 -xdev

Frequent Advisor

Re: File system is going to full :: /usr, /var and /tmp

If you really want to free some space, use find command or you have to look yourself.

find /var -size +8000000c this will search file above 8 or 8mb. similary you can use for rest of the file system.

Re: File system is going to full :: /usr, /var and /tmp

Careful about files in /var/adm/sw, this is where the patch info is stored.
Use cleanup(1m).
Bill Hassell
Honored Contributor

Re: File system is going to full :: /usr, /var and /tmp

Don't blindly delete big files. As Dennis cautions, deleting things in /var/adm/sw could render your system incapable of installing any updates or patches. Analyze the space by directory:

du -kx /var | sort -rn | head -30

Now look in the biggest directories and delete wisely. /tmp is less critical than /var but deleting things in /usr is not a good idea without careful consideration. Use the same command above for /usr.

Bill Hassell, sysadmin
muruganantham raju
Valued Contributor

Re: File system is going to full :: /usr, /var and /tmp

Hi Mehul,

(1) /tmp is is dumped with files. Please analyze and remove files/directories not required.
(2) Find if there are core dumps in the system. Usually core files are of huge size.

find . / -name core

Remove the core dumps if there are any in the system.
(3) Are you running any application that creates log files/data back up. If there is any such application running, remove the old backups and perform log file rollover.

Viktor Balogh
Honored Contributor

Re: File system is going to full :: /usr, /var and /tmp

Hi mehul,

Before deleting anything make sure that the files aren't in use. For this, issue the fuser command. If you delete an in-use file, the space won't get freeed until the process terminates which used that inode.

Unix operates with beer.