1

My platform is Ubuntu 12.04.

I have been reading and this text actually follows the flow on the link, Broken package after update: linux-headers, error: BrokenCount >0

I have a broken package after an update. Originally my disk was full but I have since fixed that and I have 4+ gigs free space now.

I then read here that I should run the commands:

sudo apt-get -f install 
sudo apt-get install --fix-broken,

I got the following results:

(Reading database ... 897477 files and directories currently installed.)
Unpacking linux-image-3.2.0-67-generic (from .../linux-image-3.2.0-67-generic_3.2.0-67.101_amd64.deb) ...
Done.
dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-67-generic_3.2.0-67.101_amd64.deb (--unpack):
 unable to create `/lib/modules/3.2.0-67-generic/kernel/drivers/usb/gadget/g_dbgp.ko.dpkg-new' (while processing `./lib/modules/3.2.0-67-generic/kernel/drivers/usb/gadget/g_dbgp.ko'): No space left on device
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-67-generic /boot/vmlinuz-3.2.0-67-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-67-generic /boot/vmlinuz-3.2.0-67-generic
Unpacking linux-headers-3.2.0-67 (from .../linux-headers-3.2.0-67_3.2.0-67.101_all.deb) ...
dpkg: error processing /var/cache/apt/archives/linux-headers-3.2.0-67_3.2.0-67.101_all.deb (--unpack):
 error creating directory `./usr/src/linux-headers-3.2.0-67/crypto/async_tx': No space left on device
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Unpacking linux-headers-3.2.0-67-generic (from .../linux-headers-3.2.0-67-generic_3.2.0-67.101_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/linux-headers-3.2.0-67-generic_3.2.0-67.101_amd64.deb (--unpack):
 unable to create `/usr/src/linux-headers-3.2.0-67-generic/include/config/mtd/scb2/flash.h.dpkg-new' (while processing `./usr/src/linux-headers-3.2.0-67-generic/include/config/mtd/scb2/flash.h'): No space left on device
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.2.0-67-generic_3.2.0-67.101_amd64.deb
 /var/cache/apt/archives/linux-headers-3.2.0-67_3.2.0-67.101_all.deb
 /var/cache/apt/archives/linux-headers-3.2.0-67-generic_3.2.0-67.101_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I then read some more and ran this command,

df -i

And got these results.

Filesystem        Inodes  IUsed     IFree IUse% Mounted on    
/dev/sda3         915712 914583      1129  100% /  
udev              253906    560    253346    1% /dev  
tmpfs             256105    502    255603    1% /run  
none              256105      3    256102    1% /run/lock  
none              256105      5    256100    1% /run/shm  
/dev/sda6        1220608  30875   1189733    3% /home  
/dev/sdb1      821888880 141598 821747282    1% /media/Seagate Backup Plus Drive  

So reading on I ran this command,

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

and I too got a huge list, 10 text pages to be exact.
But at that point I get lost. I haven't any idea which file is too big or which is not. Some of the files are as big as

  • 354M /var/lib
  • 636M /var
  • 130M /var/cache/apt
  • 260M /var/cache

But nowhere in the list is the word, “trash,” and when I run the command,

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

It tells me file trash not found. I think I understand that what I have to do is figure out how to get the line that reads

  • /dev/sda3 915712 914583 1129 100% /

to read something less than 100% so that I have room to fix the broken package but I am at a loss how to do that. And I am apprehensive to just start erasing things Willy-nilly.
I am willing to read so if there is a link some place that talks all about this just point me and I will go digest as best as I am able. Thanks to anyone for the help.

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        14G   12G  2.1G  85% /
udev            992M  4.0K  992M   1% /dev
tmpfs           201M  1.1M  200M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none           1001M  140K 1001M   1% /run/shm
/dev/sda6        19G   14G  4.0G  78% /home
/dev/sdb1       932G  148G  784G  16% /media/Seagate Backup Plus Drive
/dev/sda7       104G  188M   99G   1% /media/cd3f76e1-724f-4b8f-b29c-cc901b071fdb
/dev/sda2        94G   84G  9.8G  90% /media/069CBC4E9CBC3A4F
$ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        14G   12G  2.1G  85% /
Zanna
  • 70,465
  • it looks like /dev/sda3 is full. Can you post the outputs of df -h and df -h /boot appending the results to your question? – Charles Green Aug 07 '14 at 21:21
  • bobby@bobby-May-Spark-often:~$ df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda3 14G 12G 2.1G 85% /
    udev 992M 4.0K 992M 1% /dev
    tmpfs 201M 1.1M 200M 1% /run
    none 5.0M 0 5.0M 0% /run/lock
    none 1001M 76K 1001M 1% /run/shm
    /dev/sda6 19G 14G 4.0G 78% /home
    /dev/sda7 104G 188M 99G 1% /media/cd3f76e1-724f-4b8f-b29c-cc901b071fdb
    /dev/sda2 94G 84G 9.8G 90% /media/069CBC4E9CBC3A4F
    – Thomas Davis Aug 09 '14 at 18:03

2 Answers2

1

I don't think you're going to appreciate this much, but here goes. Your root directory ('/') is on sda3, and it's pretty full. 12 GB is not a lot for the Ubuntu OS + programs + various other items and settings. You do have /boot located in the same partition, so you may be able to remove old kernels to retrieve some space.

The command below, to be run from a terminal, will delete all but the current kernel. I did not write this script, but got it from How do I remove old kernel versions to clean up the boot menu? This 8may* remove enough space for you to continue operations for a while.

sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')
Charles Green
  • 21,339
0

I see you have /dev/sda3 full at 100%

It is possible that SDA3 is your Swap Partition. Launch "Disk Usage Analyzer" to determine if this is the case. With this program you can see for what /dev/sda3 is used: file system or swap. If it is Swap, then this is not an issue.

Otherwise; try emptying the trash bin.

Anon
  • 12,063
  • 23
  • 70
  • 124
Ed Weber
  • 1
  • 2
  • I see Charles Green already comented ... seems to use the terminal a lot, good sign that he'll may solve your problem – Ed Weber Aug 07 '14 at 21:46
  • If under analyzer on the top menu I choose scan folder, then choose File system from the drop down menu I find /dev. If I double click /dev inside I find sda3. But it shows 0 bytes. If I open the folder and scroll down to sda3 and click on properties it says: Type: block device (inode/blockdevice), Size: 0 bytes, Location:/dev, and Volume:Unknown. Under permissions it shows the owner as root and the group as disk. Looks like it is file system. How do I reduce it's contents when it shows nothing there already?

    Trash is empty.

    – Thomas Davis Aug 09 '14 at 18:00
  • @EdWeber I'm getting a reputation? :) – Charles Green Aug 09 '14 at 18:44