9

I have a thin VPS running Ubuntu 14.04 with automatic security updates. It has filled up the /boot partition with a lot of kernel updates. I am trying to remove the older ones, but I'm running into an "unmet" dependencies error demanding I fix another package before I can continue. Unfortunately, the unmet dependency wants to install a new kernel to the partition that is 100% full.

$ sudo apt-get remove [an old linux-image* package] 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-88-generic : Depends: linux-image-3.13.0-88-generic but it is not going to be installed linux-image-generic : Depends: linux-image-3.13.0-88-generic but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). 

With the partition full, there is no way I can apt-get -f install to correct anything. Is there a way to tell apt-get to not check for unmet dependencies in the database, which have nothing to do with the packages I need to remove? Once I free up some space, I can actually solve the broken packages too.

My alternate solution is to manually free up space by moving some kernels out of the way (to /kernels), fix the dependency issue, remove some kernel packages, and move /kernels/* back if I cannot instruct apt-get to cooperate otherwise.

EDIT

I tried apt-get -f remove PACKAGENAME, but it hit the dep error. But apt-get -f autoremove ignored the dep problems. Without -f, autoremove hit the dep error. With it, some kernels were found for removal and it is working on it. So while my immediate problem is resolved, I still would like to know if the regular apt-get -f remove PACKAGENAME can have the same capability of ignoring unrelated dependency issues.

2
  • for future reference had you executed following command every few days you would be fine now ... DEBIAN_FRONTEND=noninteractive sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get -f install -y && sudo env DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confnew" -yy dist-upgrade -yq && DEBIAN_FRONTEND=noninteractive sudo apt-get autoremove -yq && sudo apt-get autoclean -y && [ -f /var/run/reboot-required ] && sudo reboot now Commented Oct 17, 2018 at 2:26
  • also be aware current ubuntu auto cleans up its boot partition unlike old releases Commented Oct 17, 2018 at 2:28

1 Answer 1

5

dpkg --remove DOES remove the packages without complaining about the failed install. That get you disk space to do apt-get -f autoremove

2
  • 1
    (not original poster) the problem is you cannot do anything with apt-get until these dependencies are resolved. Commented Jun 13, 2018 at 12:27
  • it complains on dependencies instead... Commented Feb 27, 2020 at 16:25

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.