Удалите старые ядра из / boot, чтобы освободить место [дубликат]

Я хочу освободить часть места в / boot, но не могу.

Filesystem            1K-blocks     Used Available Use% Mounted on
/dev/sda1                474730   463590         0 100% /boot

Я пробовал sudo apt-get autoremove --purge , но после ошибки

sudo apt-get autoremove --purge
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
linux-image-extra-4.4.0-137-generic : Depends: linux-image-4.4.0-137-generic but it is not installed
 linux-image-extra-4.4.0-142-generic : Depends: linux-image-4.4.0-142-generic but it is not installed
 linux-image-generic : Depends: linux-image-4.4.0-142-generic but it is not installed
                   Recommends: thermald but it is not installed
E: Unmet dependencies. Try using -f.

я пробовал sudo apt-get -f install , но из-за отсутствия пустого места я Я не могу успешно запустить его и получаю следующую ошибку

Unpacking linux-image-4.4.0-137-generic (4.4.0-137.163) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0- 
137-generic_4.4.0-137.163_amd64.deb (--unpack):
cannot copy extracted data for './boot/abi-4.4.0-137-generic' to '/boot/abi- 
4.4.0-137-generic.dpkg-new': failed to write (No space left on device)

. Я также пытался удалить его, используя dpkg со следующим кодом

dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge

. Я получил следующую ошибку для указанной выше команды.

root@servername:/# dpkg --list | grep linux-image | awk '{ print $2 }' | 
sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge
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-4.4.0-112-generic : Depends: linux-image-4.4.0-112-generic 
but it is not going to be installed
linux-image-extra-4.4.0-116-generic : Depends: linux-image-4.4.0-116-generic 
but it is not going to be installed
linux-image-extra-4.4.0-119-generic : Depends: linux-image-4.4.0-119-generic 
but it is not going to be installed
linux-image-extra-4.4.0-121-generic : Depends: linux-image-4.4.0-121-generic 
but it is not going to be installed
linux-image-extra-4.4.0-124-generic : Depends: linux-image-4.4.0-124-generic 
but it is not going to be installed
linux-image-extra-4.4.0-127-generic : Depends: linux-image-4.4.0-127-generic 
but it is not going to be installed
linux-image-extra-4.4.0-128-generic : Depends: linux-image-4.4.0-128-generic 
but it is not going to be installed
linux-image-extra-4.4.0-21-generic : Depends: linux-image-4.4.0-21-generic 
but it is not going to be installed
linux-image-generic : Depends: linux-image-4.4.0-142-generic but it is not 
going to be installed
                   Depends: linux-image-extra-4.4.0-142-generic but it is not going to be installed
                   Recommends: thermald but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Я пытался удалить старые ядра одно за другим, но все равно не повезло

root@servername:/# sudo apt-get purge linux-image-4.4.0-112-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-4.4.0-112-generic : Depends: linux-image-4.4.0-112-generic 
but it is not going to be installed
linux-image-generic : Depends: linux-image-4.4.0-142-generic but it is not 
going to be installed
                   Depends: linux-image-extra-4.4.0-142-generic but it is 
not going to be installed
                   Recommends: thermald but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Я также пробовал с sudo rm -rf /boot/*-34.4.0-{112,116,119,121,124,127,128,21}-*, но все же не повезло.

Кто-нибудь знает, как решить?

Заранее спасибо.

0
задан 27 February 2019 в 01:31

1 ответ

Единственное решение состоит в том, чтобы удалить их вручную, это был бы первый раз, когда комната-rf не работает. Ваши условия не соответствуют, вероятно.

sudo rm -rf /boot/*-4.4.0-{112,116,119,121,124,127,128,21}-*
2
ответ дан 26 October 2019 в 03:38

Другие вопросы по тегам:

Похожие вопросы: