Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

My server /dev/sda1 disk full

root@server:/var/www# df 
Filesystem 1K-blocks      Used Available Use% Mounted on 
/dev/sda1   48060296  45653236         0 100% / 
udev         8055724        12   8055712   1% /dev 
tmpfs        3225816      1140   3224676   1% /run 
none            5120         0      5120   0% /run/lock 
none         8064536       144   8064392   1% /run/shm 
/dev/sda3  908566268 580691288 281722432  68% /home

Previously when I perform apt-get autoclean & clean I can solve the issue by clear some space. But this time it's not working.

I wish to know which directory under /dev/sda1 but I couldn't check on it. How should I do? Which directory I should look into it and delete those folder?

Having /dev/sda1 full has jammed up MySQL.


share|improve this question

3 Answers 3

Please use this answer as a last resort due to the likelyhood that you already done this.

Try clear out any old kernels with sudo apt-get autoremove then check your disk usage again.

share|improve this answer

Looks like your root filesystem is full (a bit hard to read the output of df - try use df -BM for the disk usage in megabytes rather than bytes). The root filesystem is mounted on /dev/sda1 which refers to a physical device - in this case a hard disk. Directories under / which can take up space are /var and /tmp (and others) - /tmp should clear on a reboot but log files in /var can occupy space

try du -sh /directory_name to get the size of each directory to see which is taking up most space

For example du -sh /var

share|improve this answer

You really shouldn't have partitioned your hard drive that way. You partition it that way when you'll have a few system files and applications accessible to all users on one small partition (/) and per-user data on the other very large partition (/home). In other words, it's for standard desktop use.

You have a MySQL server that stores huge database files, which don't fit anywhere in that scheme. In other words, you have a server that's not run by a particular real user, not purely a standard desktop.

You should probably repartition, either to merge the / and /home partitions (the best option to avoid this sort of thing) or to increase the proportion allocated to the / partition.

With that out of the way, use BleachBit.

Use BleachBit from the Universe repository:

Turn off MySQL

  1. Open up a terminal (press Ctrl+Alt+T) and run the following:

    sudo service mysql stop

Free up some space by removing unneeded and still-packed software and by removing archived log files:

  1. Open up a terminal and run the following:

    sudo -i
    apt-get autoremove --purge
    apt-get autoclean
    apt-get clean
    rm -rf /var/cache/apt/archives/*
    find /var/log -name '*.gz' -delete

Turn on the Universe repository through Synaptic Package Manager

  1. Open Synaptic Package Manager.
  2. Settings menu > Repositories.
  3. Make sure Community-maintained free and open-source software (universe) is checked.
  4. Click Close.
  5. Exit Synaptic Package Manager.

Fix things because you're using an unsupported release (12.10)

  1. Only follow this section if you're using a release that's so old that it's no longer supported.
  2. Open up a terminal and run the following:

    sudo nano /etc/apt/sources.list
  3. Replace everything that has the pattern http://whatever/ubuntu with

  4. Press Ctrl+O, Ctrl+X to save and exit.

Install BleachBit

  1. Open up a terminal and run the following:

    sudo -i
    apt-get update
    apt-get install bleachbit

Run BleachBit as root

  1. Open the applications menu (press Alt+F1).
  2. System Tools menu > BleachBit (as root).
  3. Clean a bunch of stuff.

Turn on MySQL

  1. Open up a terminal and run the following:

    sudo service mysql start
share|improve this answer

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.