I have a server running Ubuntu Server 12.xx. Today some services stopped and I found some messages about full disk, so I ran df -h:

Filesystem                Size  Used   Disp Use% 
/dev/mapper/ubuntu-root   455G   434G     0 100% /
udev                      1,7G   4,0K  1,7G   1% /dev
tmpfs                     689M   4,2M  685M   1% /run
none                      5,0M      0  5,0M   0% /run/lock
none                      1,7G      0  1,7G   0% /run/shm
/dev/sda1                 228M    51M  166M  24% /boot
overflow                  1,0M      0  1,0M   0% /tmp

I tried to delete some files remotely from a Windows computer by right-clicking and choosing "delete", but the hard drive remained full.

Is there a Trash folder in Ubuntu Server? What could be happening?

  • What kinds of services are you running? Any that would accumulate data or large log files?
    – ændrük
    Nov 5, 2013 at 3:35
  • @guntbert has provided good guidance. If you are running a server, my first port or call would be the /var partition or directory. You could cleanup some old log files, then run the find command to see which files changed in the last 5 minutes, for example 'find /var -mmin -5'
    – crafter
    Nov 5, 2013 at 5:16
  • serverfault.com/q/229454 May 1, 2015 at 19:39
  • Same point here: serverfault.com/a/232526 May 1, 2015 at 19:41

4 Answers 4


Use du to find where the most space is used:

sudo du -xs /* 2>/dev/null |sort -n

This will give you a list of all directories in / sorted by size (2>/dev/null just serves to hide error messages, -x restricts the search to one file system).


3510468 /var
6398936 /usr
14496756    /home

Now the last lines in the output tell you the biggest directories, the next step (in my example) would be

sudo du -xs /home/* 2>/dev/null |sort -n

and so on, until you find where all your space is used up.

There use ls -lS to see all the files, sorted by size, the decide what you want to delete. Caution don't just delete any big file if you don't know what its purpose is :-))

  • Thanks again. The problem is that I deleted some files but df -h still shows 100% used
    – julio
    Oct 26, 2013 at 16:11
  • You can still follow the procedure. Are we talking about files in your home directory?
    – guntbert
    Oct 26, 2013 at 16:13
  • du --si option will give the sizes in Meg, Gigs etc. Same with ls -h
    – crafter
    Nov 5, 2013 at 5:10
  • @crafter true, but that doesn't fit well with sorting.
    – guntbert
    Nov 5, 2013 at 17:44

If you deleted the files through the filemanager, it probably only moved them to the rubbish bin. There should be an icon in the left pane for you to navigate to the rubbish bin.

The files should be placed in ~/.local/share/Trash/.

You can find out more about your disk usage using du or a grpahical frontend like filelight.

  • Thank you, but I don´t have desktop interface, and don´t find /.local
    – julio
    Oct 26, 2013 at 14:23
  • 1
    @julio Did you miss the tilde?
    – ændrük
    Nov 5, 2013 at 3:26

If you want to look for "big fish" to delete, you could use find.

# find / -xdev -size +1G

The above will find files greater than 1 Gigabytes in size starting at "/" and only descending into subdirectories that stay on the filesystem that hosts "/".

The command below will look for files greater than 250 Megabytes in size.

# find / -xdev -size +250M

Refer to the find man page for more details.


In case anyone else has this problem again, do

sudo tune2fs -m 0 /dev/sdaX
# /dev/sdaX is your partition, check with df

Credits go here: Why doesn't deleting files increase available space?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.