Unmet dependencies

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Melu
Level 2
Level 2
Posts: 94
Joined: Mon Oct 15, 2018 4:23 am
Location: Uusimaa, Finland

Unmet dependencies

Post by Melu »

Hello everybody,
time ago I made a mess with kernels, triyng to remove old installations. I have an encrypted laptop, Linux Mint 18.33 Cinnamon 64-bit. I can't install anything any more, nor make updates. I asked this problem to the Italian forum but they couldn't solve it. Now:

Code: Select all

xhino@1312 ~ $ sudo apt install -f
[sudo] password for xhino: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  linux-image-4.15.0-33-generic linux-modules-4.15.0-33-generic
Suggested packages:
  fdutils linux-hwe-tools
The following NEW packages will be installed
  linux-image-4.15.0-33-generic linux-modules-4.15.0-33-generic
0 to upgrade, 2 to newly install, 0 to remove and 106 not to upgrade.
2 not fully installed or removed.
Need to get 0 B/20,9 MB of archives.
After this operation, 74,4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 625946 files and directories currently installed.)
Preparing to unpack .../linux-modules-4.15.0-33-generic_4.15.0-33.36~16.04.1_amd64.deb ...
Unpacking linux-modules-4.15.0-33-generic (4.15.0-33.36~16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-modules-4.15.0-33-generic_4.15.0-33.36~16.04.1_amd64.deb (--unpack):
 cannot copy extracted data for './boot/System.map-4.15.0-33-generic' to '/boot/System.map-4.15.0-33-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)
Preparing to unpack .../linux-image-4.15.0-33-generic_4.15.0-33.36~16.04.1_amd64.deb ...
Unpacking linux-image-4.15.0-33-generic (4.15.0-33.36~16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.15.0-33-generic_4.15.0-33.36~16.04.1_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-4.15.0-33-generic' to '/boot/vmlinuz-4.15.0-33-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)
Errors were encountered while processing:
 /var/cache/apt/archives/linux-modules-4.15.0-33-generic_4.15.0-33.36~16.04.1_amd64.deb
 /var/cache/apt/archives/linux-image-4.15.0-33-generic_4.15.0-33.36~16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Code: Select all

xhino@1312 ~ $ df -h
File system                Dim. Usati Dispon. Uso% Montato su
udev                       2,9G     0    2,9G   0% /dev
tmpfs                      587M  8,7M    578M   2% /run
/dev/mapper/mint--vg-root  452G  276G    153G  65% /
tmpfs                      2,9G   58M    2,9G   2% /dev/shm
tmpfs                      5,0M  4,0K    5,0M   1% /run/lock
tmpfs                      2,9G     0    2,9G   0% /sys/fs/cgroup
/dev/sda2                  473M  472M       0 100% /boot
/dev/sda1                  511M  3,5M    508M   1% /boot/efi
cgmfs                      100K     0    100K   0% /run/cgmanager/fs
tmpfs                      587M   28K    587M   1% /run/user/1000

Code: Select all

xhino@1312 ~ $ dpkg -l | grep linux-image
ri  linux-image-4.10.0-38-generic                               4.10.0-38.42~16.04.1                                    amd64        Linux kernel image for version 4.10.0 on 64 bit x86 SMP
ri  linux-image-4.13.0-43-generic                               4.13.0-43.48~16.04.1                                    amd64        Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii  linux-image-4.13.0-45-generic                               4.13.0-45.50~16.04.1                                    amd64        Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii  linux-image-4.15.0-24-generic                               4.15.0-24.26~16.04.1                                    amd64        Signed kernel image generic
ii  linux-image-4.15.0-29-generic                               4.15.0-29.31~16.04.1                                    amd64        Signed kernel image generic
ii  linux-image-4.15.0-30-generic                               4.15.0-30.32~16.04.1                                    amd64        Signed kernel image generic
ii  linux-image-4.15.0-32-generic                               4.15.0-32.35~16.04.1                                    amd64        Signed kernel image generic
ri  linux-image-extra-4.10.0-38-generic                         4.10.0-38.42~16.04.1                                    amd64        Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
ii  linux-image-extra-4.13.0-43-generic                         4.13.0-43.48~16.04.1                                    amd64        Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
ii  linux-image-extra-4.13.0-45-generic                         4.13.0-45.50~16.04.1                                    amd64        Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Society does not consist of individuals, but expresses the sum of interrelations, the relations within which these individuals stand.
richyrich

Re: Unmet dependencies

Post by richyrich »

..failed to write (No space left on device)
/dev/sda2 473M 472M 0 100% /boot
Time to remove some of your old kernels that you are not using anymore.
gm10

Re: Unmet dependencies

Post by gm10 »

Melu wrote: Mon Oct 15, 2018 4:56 am time ago I made a mess with kernels, triyng to remove old installations. I have an encrypted laptop, Linux Mint 18.33 Cinnamon 64-bit. I can't install anything any more, nor make updates.
Your problem is the full /boot partition. Run this in a terminal (copy & paste as a whole):

Code: Select all

dpkg-query -W -f '${Version}\n' 'linux-image-[^g]*'|sort -u|sed -e '/^$/d' -e 's/\~[^~]*$//' -e 's/\.[^.]*$//' -e "/$(uname -r|sed s/-generic//)/d" -e 's/.*/sudo rm -rfv \/boot\/*-&-*/'|source /dev/stdin
This will delete a bunch of files from that partition. Then run this:

Code: Select all

sudo apt-get install -f -y
sudo apt-get autoremove --purge -y
sudo update-grub
and finally this:

Code: Select all

dpkg-query -W -f '${Version}\n' 'linux-image-[^g]*'|sort -u|sed -e '/^$/d' -e 's/\~[^~]*$//' -e 's/\.[^.]*$//' -e "/$(uname -r|sed 's/-generic//')/d" -e 's/.*/linux-*-&*/'|tr '\n' ' '|xargs -r sudo apt-get remove --purge -y
If that last one generates errors please post them here, I don't need to see them for the previous commands. Otherwise you'll be all good after that. All kernels except your current one will have been removed.
User avatar
Melu
Level 2
Level 2
Posts: 94
Joined: Mon Oct 15, 2018 4:23 am
Location: Uusimaa, Finland

Re: Unmet dependencies

Post by Melu »

gm10 wrote: Mon Oct 15, 2018 9:26 amremoved.
This worked! Amazing. I was able to make all the updates. Thank you so much! :D
Society does not consist of individuals, but expresses the sum of interrelations, the relations within which these individuals stand.
Locked

Return to “Installation & Boot”