0

I'm very new to Linux so please bear with me. I attempted to upgrade to 14.04 from 12.04.02 I received the error:

"The following packages have unmet dependencies"

I ran apt-get -f install and received more errors. apt-get autoremove also gives me the dependencies error.

When I run uname -a it shows that I'm running 3.2.0-56 and the dependencies tell me the package is dependent on 3.2.0-65 So my question is can I safely delete all the other packages in /boot to recover some space? That seems to be the issue because there is only 200 MB or so available.There are numerous packages that I believe I should be able to delete:

3.2.0-55 and 3.2.0.-57, 58, 59, 60, 61, 63 and 64. 
αғsнιη
  • 35,660
  • You should never delete a package manually. If you want to remove any package remove is using sudo apt-get remove <package_name>. But you need to fix this dependency issue. – g_p Sep 26 '14 at 19:34
  • Please, specify more information, more lines from error messages. 200Mb free in boot is normal. – ulcha Sep 26 '14 at 19:36
  • Good point. I believe I did know that but I appreciate the reminder. That being said is it ok to remove the packages that aren't my current kernel and the one I'm attempting to upgrade to? – Chris Mullins Sep 26 '14 at 19:37
  • Here's what I get: root@server:/# 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-image-generic-pae : Depends: linux-image-3.2.0-67-generic-pae but it is n ot installed E: Unmet dependencies. Try using -f. – Chris Mullins Sep 26 '14 at 19:40
  • To know how to remove old kernel from /boot using command line , see here – g_p Sep 26 '14 at 19:43
  • try sudo apt-get -f install first. – g_p Sep 26 '14 at 19:44
  • I did. The output is too long to post here. Let me know if there's any specific parts of the output that would help. Thanks. – Chris Mullins Sep 26 '14 at 19:48
  • ulcha - It states that /boot is using 99.1% of the 227MB I believe that's the issue. – Chris Mullins Oct 07 '14 at 19:59

1 Answers1

0

I would advise you to not delete but move them instead to a temporary location (ex a USB drive or a different partition).

Removing them does not remove the package, and if you later need to remove those packages you may get some problems.

After you freed up some space, you can then try to fix your dependencies issues and then uninstall all those unneeded kernels. If you get some problem you just move the files again to /boot as needed.

Also if you have only one partiton (ie / and /boot are on the same partition) it may be easier to cleanup some space in other locations (ex: /var/cache/apt)

Salem
  • 19,744
  • Thanks, I'm looking into that now. Like I said, very new to Linux. I inherited this server (several actually) and am trying to get them up to date. I'm not sure if 'ls -alh' is showing me how much space is actually in each location. They're mostly showing 20K. – Chris Mullins Sep 26 '14 at 20:12
  • I found this in another thread:Removing and reinstalling linux-generic will solve this issue.To do this,try the below command on virtual console(ctrl+alt+F1)

    sudo apt-get purge linux-generic
    sudo apt-get install --reinstall linux-generic Anyone think that would work or too risky?

    – Chris Mullins Sep 26 '14 at 20:43
  • I moved all packages except the current version and the version I'm updating to (that has the dependencies) to a different directory. It freed up quite a bit of space but there's only 168M and the installer says I will need 190M for downloads. Any way to get around this? – Chris Mullins Oct 17 '14 at 17:47
  • What is the output of df -h? – Salem Oct 17 '14 at 19:47
  • Filesystem Size Used Avail Use% Mounted on /dev/mapper/zebra-root 984G 757G 177G 82% / udev 494M 12K 494M 1% /dev tmpfs 201M 596K 200M 1% /run none 5.0M 0 5.0M 0% /run/lo ck none 501M 0 501M 0% /run/sh m /dev/sda1 228M 115M 101M 54% /boot – Chris Mullins Oct 17 '14 at 20:18
  • Wow, sorry I don't know how to format in these comments – Chris Mullins Oct 17 '14 at 20:19
  • No prob. The space should be enough. A new kernel should only take ~30MB in /boot (a lot of other files will be installed in your root partition, which has plenty of space). – Salem Oct 17 '14 at 20:27
  • Thanks, you were correct about the space. I was able to successfully upgrade. Not sure how to mark your answer as correct or if I can't since I'm new. But I appreciate your insight. – Chris Mullins Oct 27 '14 at 17:58