Broken package after update: linux-headers, error: BrokenCount >0

I actually found the solution to my problems. It seemed that using root to launch nautilus caused all inodes to go up to 100%. Had to clean those up in the trashes of the root. So I did the following:

df -i

That gave me the following:

$ df -i
Filesystem     Inodes  IUsed IFree IUse% Mounted on
/dev/sda1      460560 456125  4435  100% /
udev            60125    491 59634    1% /dev
tmpfs           61943    403 61540    1% /run
none            61943      3 61940    1% /run/lock
none            61943      8 61935    1% /run/shm

woops! inodes in use 100%? that means lots and lots of tiny files stored somewhere. Where?

I used the command:

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

That gave a huge list of files which seemed ok except the fact that the root trashes was full of files in:

/root/.local/share/Trash/files/

So I ran:

sudo rm -r /root/.local/share/Trash/files/

and:

sudo touch /forcefsck

and then restarting to let the last command do its thing.

After that, running:

df -i
and df -Th

produced the following:

$ df -i
Filesystem     Inodes  IUsed  IFree IUse% Mounted on
/dev/sda1      460560 196674 263886   43% /
udev            60125    487  59638    1% /dev
tmpfs           61943    393  61550    1% /run
none            61943      3  61940    1% /run/lock
none            61943      8  61935    1% /run/shm

$ df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sda1      ext4      7,0G  4,7G  2,0G  71% /
udev           devtmpfs  235M  4,0K  235M   1% /dev
tmpfs          tmpfs      97M  816K   96M   1% /run
none           tmpfs     5,0M     0  5,0M   0% /run/lock
none           tmpfs     242M  356K  242M   1% /run/shm

iNodes were back to normal and I actually saw a slight increase in disk space (from 1,1 to 2,0 Gb) That made the system very fast too so there was a positive side effect to fixing the issue since my computer now seems to be lightning fast!

I want to note that if you suffer from the same issue, any folder in your system might hold those tiny files that fill up your inodes. Carefully examining the list that is created using:

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

will help you find which folder needs correction.


I had the same error while installing wine with update manager, and the only thing that helped was removing all my packages with rm /var/lib/apt/lists* -vf

sudo rm /var/lib/apt/lists/* -vf

It removed my packages, then I launched Software Center. It said that it had broken packages, so I chose to repair them. It downloaded the necessary packages. After it everything went well.


I found the same problem recently but the culprit was Ubuntu itself. Due to the way it "does not" handles "rotation".

Previous versions of the linux-headers-generic package as well as the linux-images packages never got removed. If it was the last two or three no problem, but there were almost 20 versions of the kernel and kernel headers. the linux-headers package has a huge number of files, which eats up all your i-nodes. With removing all but the last tree kernels headers (previous linux-headers-generic-3.2.0-?) I went down from 100% i-nodes used to 45% used.

At first I didn't know what was causing the problem but after reading about your case I checked my i-nodes count and was a 100% full, well in practice like 200 free inodes from almost 700.000.

Just removing the previous linux-headers packages does the trick. Synaptic makes it easier with the GUI + search feature and order feature.

I write this also as a help to people encountering this problem recently.

Tags:

Updates

Apt