/dev/sda1 /boot is full
/boot
contains (among other things) the linux kernels you have installed. These come with updates every now and then.
Open a Terminal and type
dpkg --list | grep linux-image
and then hit ENTER
then compare the output from that with
uname -r
... where the output tells which of the above you have in use.
All the others can be removed, freeing up space - unless you have a reason to keep them. That is accomplished by replacing "linux-image-x.x.x.x-generic" here:
sudo apt-get purge linux-image-x.x.x.x-generic
for each one that you wish to remove.
Then AFTER THE LAST - you MUST do this to clean up/recreate the boot menu accordingly
sudo update-initramfs -u # remakes boot ramdisk sudo update-grub2 # re-creates boot menu
edit
This...
find /boot -type f -printf "%-16s %p\n" | sort -nr | head -n 20
... will show you the 20 largest files in /boot
Related videos on Youtube
DigitalEvolution
Updated on September 18, 2022Comments
-
DigitalEvolution over 1 year
I know there are a lot of questions like this but I've tried pretty much to understand what to do and failed.
By
df -h
I know that my/dev/sda1 /boot
is with 100% use.I'm not understanding what I should remove, at all. I'm running nginx and wanted to install nodejs but I was alerted of unmet dependencies when trying
sudo apt-get install nodejs
andsudo apt-get -f install
failed for lack of space. Can I get some specific guidance on this one please? I'm feeling totally lost.dpkg --list | grep linux-image: ii linux-image-3.8.0-29-generic 3.8.0-29.42~precise1 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii linux-image-3.8.0-34-generic 3.8.0-34.49~precise1 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii linux-image-3.8.0-35-generic 3.8.0-35.52~precise1 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii linux-image-3.8.0-36-generic 3.8.0-36.52~precise1 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii linux-image-3.8.0-37-generic 3.8.0-37.53~precise1 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii linux-image-3.8.0-38-generic 3.8.0-38.56~precise1 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii linux-image-3.8.0-39-generic 3.8.0-39.58~precise1 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii linux-image-3.8.0-42-generic 3.8.0-42.62~precise1 Linux kernel image for version 3.8.0 on 32 bit x86 SMP iU linux-image-generic-lts-raring 3.8.0.44.44 Generic Linux kernel image
uname -r: 3.8.0-42-generic
sudo apt-get purge linux-image-x.x.x.x-generic You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies. linux-image-generic-lts-raring : Depends: linux-image-3.8.0-44-generic but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
sudo apt-get -f install dpkg: error processing /var/cache/apt/archives/linux-image-3.8.0-44-generic_3.8.0-44.66~precise1_i386.deb (--unpack): failed in write on buffer copy for backend dpkg-deb during ./boot/vmlinuz-3.8.0-44-generic': 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.8.0-44-generic /boot/vmlinuz-3.8.0-44-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.8.0-44-generic /boot/vmlinuz-3.8.0-44-generic Errors were encountered while processing: /var/cache/apt/archives/linux-image-3.8.0-44-generic_3.8.0-44.66~precise1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
-
geethujoseph almost 10 yearsProbably you have many kernel versions installed. What is the output of
dpkg --get-selections | grep -E 'linux-image|linux-headers'
anddf -h /boot
? -
Hannu almost 10 yearsWell, that was in about the same instant as my answer below ;-)
-
bain almost 10 yearsRun the
dpkg -l ...
command from this answer
-
-
DigitalEvolution almost 10 yearsthanks hannu, please check the edit to my answer, still in problems :s
-
Hannu almost 10 yearsAs I said above
uname -r
tells what to keep. And thenreplacing "linux-image-x.x.x.x-generic"
- means that you should take each of the others -linux-image-3.8.0-29-generic
tolinux-image-3.8.0-39-generic
- and use them ONE AT A TIME instead oflinux-image-x.x.x.x-generic
in the sequence above. I've edited the above slightly to help you out a bit more.