My /var fs got full to 100%

Posted on 2006-05-19
Last Modified: 2013-12-06

My /var fs got full to 100%. I have removed some files from /var/mail but it just came down to 97%. I am not receiving any mails or able to send any mails. which files or directories can i remove. can any one help us in this.

one more - how to remove e-mail address - some of my old employee's mails are still receiving mails - i want to remove their e-mail address. how to and where to remove those e-mail address permamnently.

i appreciate u r help on this.

Question by:z670193
    LVL 4

    Accepted Solution

    One step at a time.
    Boot in runlevel 1 or do a init 1 at the console
    the go to /var/log and delete some *.tar.gz or *.tar or *.gz or *.tgz file you find there. Those are old backups of your logs.

    Do you see an unusually large file in there?
    /var/log/messages for example?

    You must comment on the distro of linux you're using, the smtp daemon and the user structure.
    But I will assume is a standard linux, with sendmail and local users.

    let's say is one of your old employess and you want to delete that user.
    1- check if /etc/passwd has an entry for "joe"
    2- check if /home has a directory called joe
    3- check if /var/mail has a file called joe

    Then delete the user in step 1, that will prevent sendmail from deliver mails to him.
    make sure number 2 dissapears, if not, delete it
    make sure number 3 dissapears, if not, delete it.


    LVL 87

    Expert Comment

    What distro are you using? If it is based on debian, you would probably have a /var/cache/apt/archives. Here the downloaded archives of your .deb files are located. These you don't need anymore and you can delete them. You can also use apt-get clear to delete them. If it is fedora-core or red-hat, and you are using yum to update the system you can delete the rpm's in /var/cache/yum/.... which are there for the same reason as in debian.

    If you have a partition with enough room, you could use a livecd like knoppix, and then with that OS, move the var folder to the other partition. Then make a symlink in the / with var as name. Just make sure the partition you are copying var to is loaded at bootup.
    LVL 3

    Expert Comment


    Funny you mention this problem....I just got done fixing our server running UNIX that was having the same problem.  I ended up emptying SPAM messages from /var/spool/mqueue.  Don't know if you have the same directory.  But the general idea, is to check the incoming queue and see what's going on.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now