Sorry for asking about what is probably really simple, but I've been Googling about for a week now and I've tried a lot of stuff without success.
To start off, I get a pop-up every time I boot saying my /boot partition is full, and the Synaptic Manager says linux-image-generic is broken, but it fails to reinstall either of them (linux-image-extra-3.13.0-54-generic and linux-image-generic).
My terminal tells me to try using install -f to fix things so I've tried that, and this is what it returned. Sadly, I'm still learning and I haven't been able to crack the code, I would like some help
aksel@aksels-PC:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
linux-image-3.13.0-54-generic
Suggested packages:
fdutils linux-doc-3.13.0 linux-source-3.13.0 linux-tools
The following NEW packages will be installed:
linux-image-3.13.0-54-generic
0 upgraded, 1 newly installed, 0 to remove and 344 not upgraded.
5 not fully installed or removed.
Need to get 0 B/14,7 MB of archives.
After this operation, 32,8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 431129 files and directories currently installed.)
Preparing to unpack .../linux-image-3.13.0-54-generic_3.13.0-54.91_i386.deb ...
Done.
Unpacking linux-image-3.13.0-54-generic (3.13.0-54.91) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-54-generic_3.13.0-54.91_i386.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-3.13.0-54-generic' to '/boot/vmlinuz-3.13.0-54-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 3.13.0-54-generic /boot/vmlinuz-3.13.0-54-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-54-generic /boot/vmlinuz-3.13.0-54-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-3.13.0-54-generic_3.13.0-54.91_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
purge-old-kernels
which allows much more control over what is kept. E.g. to keepN
kernelssudo purge-old-kernels --keep N
. – mbdevpl Jun 15 '16 at 06:11purge-old-kernels
is deprecated. For more control, I recommend usinglinux-purge
. Please see the updated answer. – jarno Jan 28 '18 at 13:58