Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This question already has an answer here:

I am using Linux mint 16 cinnamon. After my last upgrade free disk space dropped from 4.2GB to around 344MB. Don't know what happened. This is the output of df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda10       10G  9.1G  329M  97% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            1.7G  4.0K  1.7G   1% /dev
tmpfs           345M  1.4M  344M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.7G  1.3M  1.7G   1% /run/shm
none            100M   28K  100M   1% /run/user

How can I clear all the temporary files and folders.

Contents of var/log/dpkg.log for last upgrade are here: dpkg.log

share|improve this question

marked as duplicate by jasonwryan, slm, Anthon, Renan, Hauke Laging Apr 25 at 2:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Start by finding out what directory is taking up all your space by running $ sudo du -h / --max-depth=1 then start drilling down from there –  Creek Apr 24 at 20:15

2 Answers 2

The files in /tmp should be removed automatically at every reboot.

Finding the culprit is usually a process that takes several steps.

I suggest you start with

du -sh /*

to get a list of the directories in / with their size (-s: sum up, -h: human readable)

Then you descend into the biggest directory and repeat.

du -sh /var/*

and so on. (/var contains /var/log which can get quite big)

If there are more than a few subdirectories in one directory the visual comparison becomes difficult. In this case use something like

du -s /usr/* | sort -nr

to get the biggest directories at the end of the output (size not as nicely readable as with -h)

share|improve this answer
FWIW the ncdu command is designed to more or less automating this du -sh * process for the user. Also, it doesn't look like /tmp is mounted as tmpfs so I don't think a reboot would've cleared it. –  Joel Davis Apr 24 at 21:01
@JoelDavis that's a nice tool I didn't know about! –  guntbert Apr 25 at 7:18

You probably have some temporary package files leftover. If they are not cleared by a reboot, or if you do not want to reboot, you can use a cleanup utility such as bleachbit.

Or you can use generic disk-usage tools (disktree, treefolders, ...) or du -sk manually as guntbert suggested. Only be careful about what you delete, of course.

share|improve this answer

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