I'm getting the following error on sudo apt-get upgrade
:
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-headers-generic : Depends: linux-headers-4.4.0-151-generic but it is not installed
linux-image-generic : Depends: linux-modules-extra-4.4.0-151-generic but it is not installed
Recommends: thermald but it is not installed
E: Unmet dependencies. Try using -f.
I then tried sudo apt-get -f install
. That gives me another error:
The following additional packages will be installed:
linux-headers-4.4.0-210 linux-headers-4.4.0-210-generic linux-modules-extra-4.4.0-210-generic
The following NEW packages will be installed:
linux-headers-4.4.0-210 linux-headers-4.4.0-210-generic linux-modules-extra-4.4.0-210-generic
0 upgraded, 3 newly installed, 0 to remove and 235 not upgraded.
8 not fully installed or removed.
Need to get 47.4 MB of archives.
After this operation, 235 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-modules-extra-4.4.0-210-generic amd64 4.4.0-210.242 [36.6 MB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-4.4.0-210 all 4.4.0-210.242 [10.0 MB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-4.4.0-210-generic amd64 4.4.0-210.242 [786 kB]
Fetched 47.4 MB in 4s (11.0 MB/s)
(Reading database ... 1423830 files and directories currently installed.)
Preparing to unpack .../linux-modules-extra-4.4.0-210-generic_4.4.0-210.242_amd64.deb ...
Unpacking linux-modules-extra-4.4.0-210-generic (4.4.0-210.242) ...
dpkg: error processing archive /var/cache/apt/archives/linux-modules-extra-4.4.0-210-generic_4.4.0-210.242_amd64.deb (--unpack):
unable to create '/lib/modules/4.4.0-210-generic/kernel/drivers/media/usb/dvb-usb-v2/dvb-usb-az6007.ko.dpkg-new' (while processing './lib/modules/4.4.0-210-generic/kernel/drivers/media/usb/dvb-usb-v2/dvb-usb-az6007.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)
I have read this post. The accepted answer doesn't work b/c sudo apt-get remove linux-image-VERSION
gives me the same error as sudo apt-get -f install
. I tried the second most upvoted answer and it freed some space:
df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 799M 17M 782M 3% /run
/dev/sda1 22G 19G 2.3G 90% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 799M 0 799M 0% /run/user/1000
to:
df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 799M 17M 782M 3% /run
/dev/sda1 22G 17G 4.1G 80% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 799M 0 799M 0% /run/user/1000
After that, I ran sudo apt-get clean
, sudo apt-get autoclean
and then sudo apt-get -f install
as suggested in this answer. But I'm getting the same error. What can I do to resolve this issue?
Update
The output of df -ih
is:
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 993K 411 993K 1% /dev
tmpfs 998K 570 998K 1% /run
/dev/sda1 1.4M 1.4M 1.8K 100% /
tmpfs 998K 1 998K 1% /dev/shm
tmpfs 998K 3 998K 1% /run/lock
tmpfs 998K 16 998K 1% /sys/fs/cgroup
tmpfs 998K 4 998K 1% /run/user/1000
235 not upgraded
- This likely means that your system is severely out of date. Did this problem start because you tried to install new software without updating first? FYI: you need to always runsudo apt update
before you do anything else in apt. This gets the list of available software. If you're performing apt commands with an outdated list, you can break your package management. Also, can you tell us what version of Ubuntu you are using? Kernel 4.4 suggests that you are running 16.04 which no longer receives community support. In that case you need to install a supported release – Nmath Mar 06 '22 at 20:21xenial
in your output also shows that you are using sources from 16.04. If you added xenial sources to another version of Ubuntu, this will also break your system. Never add sources from another distribution or from another Ubuntu release version. – Nmath Mar 06 '22 at 20:22aptitude
it will automaticly download dependencies. Just install it withapt
orapt-get
. – Joepie Es Mar 06 '22 at 20:35No space left on device
. Checkdf -i
. Seems like you have not yet freed up enough space. – user535733 Mar 06 '22 at 21:43./usr/src/linux-headers-4.4.0-XX-generic/include/config
. where XX ranges from 62-150.uname -r
shows me4.4.0-150-generic
. So I think it should be safe to delete the others (perhaps also keeping the preceding two). If you want to create an answer, I'll mark it as the solution and upvote. Thanks. – James Mar 06 '22 at 22:39