Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have single partition of 92GB in which I installed Ubuntu 12.04. And for some Unknown reason a message pop ups saying that I only have 1GB of HDD space left.

I ran command sudo du -hscx * on / and /home

/home gave me this result

4.0K    C:\nppdf32Log\debuglog.txt
0           convertedvideo.avi
176M    Desktop
16K         Documents
169M    Downloads
4.0K    examples.desktop
17M         file.txt
4.0K    Music
984K    Pictures
4.0K    Public
320K    Red Hat 6.iso
2.5M    syslog-ng_3.3.6.tar.gz
4.0K    Templates
8.0K    terminal.png
1.2M    Thunderbird Attachments
698M    ubuntu10.04LTS.iso
16K         Ubuntu One
4.0K    Untitled Folder
4.0K    Videos
21G         VirtualBox VMs
22G         total

And / gave me this result

81G         home
0           initrd.img
0           initrd.img.old
833M    lib
16K         lost+found
68K         media
4.0K    mnt
260M    opt
du:         cannot access `proc/8339/task/8339/fd/4': No such file or directory
du:         cannot access `proc/8339/task/8339/fdinfo/4': No such file or directory
du:         cannot access `proc/8339/fd/4': No such file or directory
du:         cannot access `proc/8339/fdinfo/4': No such file or directory
0           proc
640K    root
908K    run
8.6M    sbin
4.0K    selinux
4.0K    srv
0           sys
148K    tmp
3.3G    usr
436M    var
0           vmlinuz
0           vmlinuz.old
86G         total

If you look at the result returned by / it shows that /home is consuming 81GB but on the other hand /home returns only 22GB.

I cant figure out whats consuming the HDD. I have not installed anything except Virtual Machines

Perpetrator found using Disk Usage Analyzer

DUA

share|improve this question
2  
I am missing Trash in the list :) –  Rinzwind Nov 20 '12 at 10:12
    
any other user ? (may be added by any software like remastersys?) Open a nautilus with using gksudo and check the home folder –  Web-E Nov 20 '12 at 10:14
add comment

4 Answers

up vote 4 down vote accepted

It might be that 'du' lists folders where different partitions are mounted with the partition size and not the actual file usage. But I'm not sure about this.

Try the command "df -h", for file system disk space usage. It will show you the size and usage of different partitions.

You can also use baobab, which gives you a graphical representation. It is installed on ubuntu per default. Just type "Disk Usage Analyzer" into the Unity hud.

Update:

Well, as for why Thunderbird uses up so much space. For one, you could look into the folder, maybe you put some other files inadvertently there. The folder with the funny name of numbers and letters is a mail profile. The data is held in sqlite database files, so you best not mess with them but just open Thunderbird. Look for mails with attachments. Use "File->Empty Trash" to finally delete mails from the trash. Use "File->Compact Folders" to optimize and clean up, but that won't bring you gigabytes of space.

share|improve this answer
1  
Oh my my great help I have added further information in my question . Its thunderbird . I have no idea how it consumed 62GB space. That also suggest y i was facing issues in Thunderbird. –  OmiPenguin Nov 20 '12 at 10:58
1  
Appreciate your help man –  OmiPenguin Nov 20 '12 at 11:18
    
You're welcome ;) –  Benjamin Maurer Nov 20 '12 at 11:23
add comment

Running

sudo du -hscx *

will not expand to hidden files and folders in the current directory. This is valid for most shells (e.g. Bash) and it concerns the * here.

I suggest to install ncdu and use that instead. This is an interactive tool which lets you browse along all directories and is very clever about real disk usage such as sparse files, hard links, etc.

enter image description here

A more Gnome/GUI tool is baobab.

share|improve this answer
add comment

Enable the Unlimited scrolling in gnome-terminal . Edit > Profiles > Default > Edit > Scrolling > and tick Unlimited.

Check this command for Gb

sudo du -h /* | grep '[0-9]G' 

or this for Mb

sudo du -h /* | grep '[0-9]M' 

If you have separate /home , give the same command for /home.

Also take a look in /var/log/ and .local/share/Trash

share|improve this answer
    
I think du dont look for hidden file. Coz .thunderbird is a hidden directory and has the massive Size 62GB –  OmiPenguin Nov 20 '12 at 11:21
    
No , du counts the hidden files too. The problem might was that you hadn't the terminal to "unlimited scrolling" and not all lines posted to stdout. –  NikTh Nov 20 '12 at 19:18
add comment

To find big files, other than du, find is also good, and better;-)

For example (find files larger than 100M):

find / -type f -size +100M -exec ls -lh {} \;

Interactively delete the files (not recommended if you are searching from / and expect large amount of files...)

find / -type f -size +100M -exec rm -i {} \;

BTW: Thunderbird profile folder 60GiB+ is quite impressive. Do check if there is anything wrong with Thunderbird.

share|improve this answer
add comment

Your Answer

 
discard

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.