Filesystem filling up due to large uvcydnctrl-udev.log file

1. Step: Find out what problem you actually have

When your filesystem is unexpectedly full, there are a lot of possible causes. See Eliah Kagan's answer for some more about this. In the vast majority of cases it should be easy to identify (and eventually repair) the real cause, so reformatting/reinstalling would not be necessary.

So the first step is to find out, what exactly is the problem, i.e., where has the missing space gone. So first execute

df -hl -x tmpfs -x devtmpfs

This shows a list of all the used partitions of the disks in your machine, their size, how full they are and their mount point. From this list, take the one which you think is too full and note its mount point. In your case, it is the root file system which is mounted at /.

Now we analyze where inside this file system the space is used. Execute

 sudo du -xhsc /* 2> /dev/null

(Replace / with the mount point identified above.) It needs sudo because not all directories might be readable for your user. It may take some time (especially on large file systems) because it needs to visit every single directory on them.

What this command does is to show you each file and directory inside the given directory together with its size (including subdirectories). So from this list take the one(s) which you think is larger than it should be, and call the command again on this directory. (That is, run the command again, but with the name of a big directory from a previous listing replacing /.)

For example, in your case it was clear /var was the only big directory, so you would need to execute

 sudo du -xhsc /var/* 2> /dev/null

Continue with these steps until you have either found a single file which is so big, or you have found a directory with lots of files that together take up all that space.

In your case the next step was to execute

 sudo du -xhsc /var/log/* 2> /dev/null

because /var/log was so big, and this showed you that there was a single log file named uvcdynctrl-udev.log with 174GB (which is obviously bad).

2. Step: Identify why the files are there and why they are so big

Now we need to find out why the identified are there, or why they are so big, if they are expected to be there.

In your case, a log file in /var/log is nothing suspicious, but its size surely is. Fortunately, a Google search simply with the file name brings up the following bug report as the first hit, which is clearly the same problem as we have: http://bugs.launchpad.net/ubuntu/+source/libwebcam/+bug/811604

3. Step: Solve the problem

In this case, a log file of some webcam-related stuff seems not to be interesting, so we can easily delete it with the command sudo rm /var/log/uvcdynctrl-udev.log and free all the space.

Unfortunately, the bug report is still open, and there are no solutions or workarounds in the comments, so you probably have to live with this bug for now. You can delete the log file from time to time to free some space.


If you copied and pasted the system files, manually reproducing them, then you should provide more information about what you did to copy and paste them, where you pasted them, anything you can remember. Even making an extra copy of all the system files on your machine is unlikely to cause anywhere near 100 GB of disk usage. Ubuntu requires less than 5 GB of available space to be installed, and even an Ubuntu system with many packages installed is unlikely for its system files to take up more than several times that size. You would probably have to make many copies to take up that much space. Or perhaps you copied files other than system files?

If your Ubuntu system has expanded by itself (from log files and updates‽) to take up 100 GB of space (or 50 GB of space), just in system files (as opposed to your documents, pictures, videos, virtual machines, and so forth), something is very wrong. The three most likely general causes of this are probably:

  • This is not really happening, and you have misinterpreted information that your system has provided you. (Please note that I am not telling you that you are mistaken; if you know how you came to have 100 GB of system files, then neither this nor the other two suggested causes below is correct.)
  • There is a bug, which affects your system, and which causes used and free space to be reported incorrectly.
  • There is a pretty serious bug, which affects your system, and which causes files (perhaps log files in /var/log) to grow at an extremely high rate and without bound.

As Sergey has said, indiscriminately deleting all files that have the same contents will quite likely cause damage to your system. For example, there are a number of blank files that might exist in your system and are used as locks or to signify some condition. You may also have programs that contain separate copies of identical files (when the files provide the same functionality for both programs, which has not been removed to a separate library or package).

You can probably get it to delete the "duplicate" files by running it as root. But you should really not do that--it will likely wreak grave harm on your Ubuntu system.

You asked in a comment:

IS there anyway to command fdupes to delete all the duplicates without asking or notifying me?

fdupes -f might do what you want. See the fdupes manpage. But you should really not do this.

Instead, you should figure out what is going on. If you want us to help you with that, we certainly will. If you expand your question to explain that you want help figuring out what's taking up space, then you'll either get answers providing that information, or this may be closed as a duplicate of another question that provides information about how to find that out. (Either situation would be likely to benefit you.) Of course, this is assuming you want us to help you find the cause of your system taking up so much space (or seeming to).

The first step to investigate this is to examine (and post, by editing your question) the output of these commands, which provide detailed information about what disks you have and how much space is free on them:

mount
df -h
sudo du -sh /*

You can run those commands in a Terminal window (Ctrl+Alt+T). The last command will take a while. You may also get some Permission denied errors (even though you're running it as root), mostly regarding .gvfs folders in users' home directories. That's nothing to worry about.