-1

I'm a bit stuck, and still a beginner. My dev/sda1 seems to have reach capacity during an upgrade.

sudo apt-get autoremove 

give me:

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 linux-image-extra-4.4.0-67-generic : Depends: linux-image-4.4.0-67-generic but it is not installed
 linux-image-extra-4.4.0-77-generic : Depends: linux-image-4.4.0-77-generic but it is not installed
 linux-image-generic : Depends: linux-image-4.4.0-77-generic but it is not installed
E: Unmet dependencies. Try using -f.

so I try

sudo apt-get -f install

gives me:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-59 linux-headers-4.4.0-59-generic linux-headers-4.4.0-62
  linux-headers-4.4.0-62-generic linux-headers-4.4.0-67
  linux-headers-4.4.0-67-generic linux-image-4.4.0-59-generic
  linux-image-4.4.0-62-generic linux-image-4.4.0-67-generic
  linux-image-4.4.0-77-generic linux-image-extra-4.4.0-59-generic
  linux-image-extra-4.4.0-62-generic linux-image-extra-4.4.0-67-generic
  linux-image-extra-4.4.0-77-generic linux-image-generic thermald
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  linux-image-4.4.0-67-generic linux-image-4.4.0-77-generic
Suggested packages:
  fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
The following NEW packages will be installed:
  linux-image-4.4.0-67-generic linux-image-4.4.0-77-generic
0 upgraded, 2 newly installed, 0 to remove and 117 not upgraded.
12 not fully installed or removed.
Need to get 0 B/40.9 MB of archives.
After this operation, 96.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 298724 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-67-generic_4.4.0-67.88_i386.deb ...
Done.
Unpacking linux-image-4.4.0-67-generic (4.4.0-67.88) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-67-generic_4.4.0-67.88_i386.deb (--unpack):
 cannot copy extracted data for './boot/abi-4.4.0-67-generic' to '/boot/abi-4.4.0-67-generic.dpkg-new': failed to write (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 4.4.0-67-generic /boot/vmlinuz-4.4.0-67-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-67-generic /boot/vmlinuz-4.4.0-67-generic
Preparing to unpack .../linux-image-4.4.0-77-generic_4.4.0-77.98_i386.deb ...
Done.
Unpacking linux-image-4.4.0-77-generic (4.4.0-77.98) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-77-generic_4.4.0-77.98_i386.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-4.4.0-77-generic' to '/boot/vmlinuz-4.4.0-77-generic.dpkg-new': failed to write (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 4.4.0-77-generic /boot/vmlinuz-4.4.0-77-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-77-generic /boot/vmlinuz-4.4.0-77-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-4.4.0-67-generic_4.4.0-67.88_i386.deb
 /var/cache/apt/archives/linux-image-4.4.0-77-generic_4.4.0-77.98_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I was doing a bunch of reading and thought I should delete me old cores so I did

dpkg -l linux-image*

output is:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  linux-image    <none>       <none>       (no description available)
un  linux-image-3. <none>       <none>       (no description available)
rc  linux-image-3. 3.13.0-100.1 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-101.1 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-103.1 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-105.1 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-106.1 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-32.57 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-43.72 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-44.73 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-46.79 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-48.80 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-49.83 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-51.84 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-52.86 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-53.89 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-54.91 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-55.94 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-57.95 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-58.97 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-59.98 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-61.10 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-62.10 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-63.10 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-65.10 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-66.10 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-67.11 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-68.11 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-71.11 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-73.11 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-74.11 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-76.12 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-77.12 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-79.12 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-83.12 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-85.12 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-86.13 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-91.13 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-93.14 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-95.14 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-96.14 i386         Linux kernel image for version 3.
rc  linux-image-3. 3.13.0-98.14 i386         Linux kernel image for version 3.
rc  linux-image-4. 4.4.0-57.78  i386         Linux kernel image for version 4.
ii  linux-image-4. 4.4.0-59.80  i386         Linux kernel image for version 4.
ii  linux-image-4. 4.4.0-62.83  i386         Linux kernel image for version 4.
ii  linux-image-4. 4.4.0-63.84  i386         Linux kernel image for version 4.
ii  linux-image-4. 4.4.0-64.85  i386         Linux kernel image for version 4.
ii  linux-image-4. 4.4.0-66.87  i386         Linux kernel image for version 4.
in  linux-image-4. <none>       i386         (no description available)
in  linux-image-4. <none>       i386         (no description available)
rc  linux-image-ex 3.13.0-100.1 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-101.1 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-103.1 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-105.1 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-106.1 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-32.57 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-43.72 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-44.73 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-46.79 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-48.80 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-49.83 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-51.84 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-52.86 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-53.89 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-54.91 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-55.94 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-57.95 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-58.97 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-59.98 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-61.10 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-62.10 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-63.10 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-65.10 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-66.10 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-67.11 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-68.11 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-71.11 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-73.11 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-74.11 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-76.12 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-77.12 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-79.12 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-83.12 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-85.12 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-86.13 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-91.13 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-93.14 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-95.14 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-96.14 i386         Linux kernel extra modules for ve
rc  linux-image-ex 3.13.0-98.14 i386         Linux kernel extra modules for ve
rc  linux-image-ex 4.4.0-57.78  i386         Linux kernel extra modules for ve
ii  linux-image-ex 4.4.0-59.80  i386         Linux kernel extra modules for ve
ii  linux-image-ex 4.4.0-62.83  i386         Linux kernel extra modules for ve
ii  linux-image-ex 4.4.0-63.84  i386         Linux kernel extra modules for ve
ii  linux-image-ex 4.4.0-64.85  i386         Linux kernel extra modules for ve
iF  linux-image-ex 4.4.0-66.87  i386         Linux kernel extra modules for ve
iU  linux-image-ex 4.4.0-67.88  i386         Linux kernel extra modules for ve
iU  linux-image-ex 4.4.0-77.98  i386         Linux kernel extra modules for ve
iU  linux-image-ge 4.4.0.77.83  i386         Generic Linux kernel image

From here, I can't figure out how to remove to old cores.

sudo dpkg --purge linux-image-3.13.0-32.57

gives me

dpkg: warning: ignoring request to remove linux-image-3.13.0-32.57 which isn't installed

Update

uname -r

shows

4.4.0-63-generic

not sure what to delete (per @waltinator suggestion) on boot. I seem to have more versions above my current core than below

ls -la
total 224209
drwxr-xr-x  4 root root     3072 May 14 07:41 .
drwxr-xr-x 22 root root     4096 Mar  8 05:26 ..
-rw-r--r--  1 root root  1240224 Jan  6 12:55 abi-4.4.0-59-generic
-rw-r--r--  1 root root  1240224 Jan 18 08:08 abi-4.4.0-62-generic
-rw-r--r--  1 root root  1241618 Feb  1 14:19 abi-4.4.0-63-generic
-rw-r--r--  1 root root  1241618 Feb 20 05:13 abi-4.4.0-64-generic
-rw-r--r--  1 root root  1241618 Mar  3 09:07 abi-4.4.0-66-generic
-rw-r--r--  1 root root   193442 Jan  6 12:55 config-4.4.0-59-generic
-rw-r--r--  1 root root   193442 Jan 18 08:08 config-4.4.0-62-generic
-rw-r--r--  1 root root   193642 Feb  1 14:19 config-4.4.0-63-generic
-rw-r--r--  1 root root   193642 Feb 20 05:13 config-4.4.0-64-generic
-rw-r--r--  1 root root   193642 Mar  3 09:07 config-4.4.0-66-generic
drwxr-xr-x  5 root root     1024 Mar  8 05:27 grub
-rw-r--r--  1 root root 34262775 Feb  9 04:29 initrd.img-4.4.0-59-generic
-rw-r--r--  1 root root 34265371 Feb  9 04:28 initrd.img-4.4.0-62-generic
-rw-r--r--  1 root root 34257074 Feb 21 12:00 initrd.img-4.4.0-63-generic
-rw-r--r--  1 root root 34258093 Feb 22 16:20 initrd.img-4.4.0-64-generic
-rw-r--r--  1 root root 34256077 Mar  8 05:27 initrd.img-4.4.0-66-generic
drwx------  2 root root    12288 Dec 28  2014 lost+found
-rw-r--r--  1 root root   182704 Jan 28  2016 memtest86+.bin
-rw-r--r--  1 root root   184380 Jan 28  2016 memtest86+.elf
-rw-r--r--  1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin
-rw-------  1 root root  3094845 Jan  6 12:55 System.map-4.4.0-59-generic
-rw-------  1 root root  3094811 Jan 18 08:08 System.map-4.4.0-62-generic
-rw-------  1 root root  3101576 Feb  1 14:19 System.map-4.4.0-63-generic
-rw-------  1 root root  3101576 Feb 20 05:13 System.map-4.4.0-64-generic
-rw-------  1 root root  3101576 Mar  3 09:07 System.map-4.4.0-66-generic
-rw-------  1 root root  6812704 Jan  6 12:55 vmlinuz-4.4.0-59-generic
-rw-------  1 root root  6812928 Jan 18 08:08 vmlinuz-4.4.0-62-generic
-rw-------  1 root root  6828960 Feb  1 14:19 vmlinuz-4.4.0-63-generic
-rw-------  1 root root  6828960 Feb 20 05:13 vmlinuz-4.4.0-64-generic
-rw-------  1 root root  6828960 Mar  3 09:07 vmlinuz-4.4.0-66-generic
  • Start at the first 'ii' kernel. 'rc' means that package has already been removed...exactly what dpkg was trying to tell you. – user535733 May 14 '17 at 21:13
0

Try this:

Open a terminal,

Press Ctrl+Alt+T

Run it:

exec sudo -i
CONFOLD=$(dpkg -l | grep '^rc' | awk '{print $2}')
KERNELCUR=$(uname -r | sed 's/-*[a-z]//g' | sed 's/-386//g')
PKGLINUX="linux-(image|headers|ubuntu-modules|restricted-modules)"
METAPKGLINUX="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
KERNELSOLD=$(dpkg -l | awk '{print $2}' | grep -E "$PKGLINUX" | grep -vE "$METAPKGLINUX" | grep -v "$KERNELCUR")
apt-get purge "$CONFOLD"
apt-get purge "$KERNELSOLD"
apt-get autoremove
apt-get clean
rm -rf /home/*/.local/share/Trash/*/** &> /dev/null
rm -rf /root/.local/share/Trash/*/** &> /dev/null
  • your suggestion fails at autoremove with the same error as originally posted – Ben May 14 '17 at 15:48
-1

The --purge option to dpkg is NOT the same as the dpkg purge command. --purge modifies the operation of the specified command (none in this case).

Get some space back on /boot - remove the ONLY oldest single big file (use uname -r to find your current kernel's version, and DO NOT delete any file with that version as part of the filename) , then resume dpkg.

The /usr/bin/purge-old-kernels script (part of the byobu package) hadles the details for you.

  • Do I just manually remove everything with -59? – Ben May 14 '17 at 15:53
  • How am I supposed to know what -59 means? – waltinator May 15 '17 at 13:02
  • He means you need to remove old kernel images from the /boot slice by way of something like rm -r *-59 – BenK Aug 24 '17 at 15:21

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