我收到一条错误消息,说明我的/ boot已满。由于磁盘已满错误或依赖项错误,尝试清理旧的图像文件似乎总是失败。有人可以解释我要去哪里了。
$ sudo apt-get autoremove
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-3.13.0-44-generic : Depends: linux-image-3.13.0-44-generic but it is not installed
linux-image-extra-3.13.0-45-generic : Depends: linux-image-3.13.0-45-generic but it is not installed
linux-image-generic : Depends: linux-image-3.13.0-45-generic but it is not installed
E: Unmet dependencies. Try using -f.
$ ls /boot
abi-3.13.0-32-generic initrd.img-3.13.0-43-generic
abi-3.13.0-36-generic lost+found
abi-3.13.0-37-generic memtest86+.bin
abi-3.13.0-39-generic memtest86+.elf
abi-3.13.0-40-generic memtest86+_multiboot.bin
abi-3.13.0-43-generic System.map-3.13.0-32-generic
config-3.13.0-32-generic System.map-3.13.0-36-generic
config-3.13.0-36-generic System.map-3.13.0-37-generic
config-3.13.0-37-generic System.map-3.13.0-39-generic
config-3.13.0-39-generic System.map-3.13.0-40-generic
config-3.13.0-40-generic System.map-3.13.0-43-generic
config-3.13.0-43-generic vmlinuz-3.13.0-32-generic
grub vmlinuz-3.13.0-36-generic
initrd.img-3.13.0-32-generic vmlinuz-3.13.0-37-generic
initrd.img-3.13.0-36-generic vmlinuz-3.13.0-39-generic
initrd.img-3.13.0-37-generic vmlinuz-3.13.0-40-generic
initrd.img-3.13.0-39-generic vmlinuz-3.13.0-43-generic
initrd.img-3.13.0-40-generic
我用了
kernelver=$(uname -r | sed -r 's/-[a-z]+//')
dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve $kernelver
要得到
linux-headers-3.13.0-32
linux-headers-3.13.0-32-generic
linux-headers-3.13.0-36
linux-headers-3.13.0-36-generic
linux-headers-3.13.0-37
linux-headers-3.13.0-37-generic
linux-headers-3.13.0-39
linux-headers-3.13.0-39-generic
linux-headers-3.13.0-40
linux-headers-3.13.0-40-generic
linux-headers-3.13.0-44
linux-headers-3.13.0-44-generic
linux-headers-3.13.0-45
linux-headers-3.13.0-45-generic
linux-image-3.13.0-32-generic
linux-image-3.13.0-36-generic
linux-image-3.13.0-37-generic
linux-image-3.13.0-39-generic
linux-image-3.13.0-40-generic
然后选择要删除的第一张图像
$ sudo apt-get purge linux-image-3.13.0-32-generic
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-3.13.0-32-generic : Depends: linux-image-3.13.0-32-generic but it is not going to be installed
linux-image-extra-3.13.0-44-generic : Depends: linux-image-3.13.0-44-generic but it is not going to be installed
linux-image-extra-3.13.0-45-generic : Depends: linux-image-3.13.0-45-generic but it is not going to be installed
linux-image-generic : Depends: linux-image-3.13.0-45-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
尝试Phrog的答案。使用
—
muru
uname -r
命令找出您当前的内核版本,然后尝试删除其他内核。
sudo apt-get autoremove
和ls /boot
。