Not able to install or update the packages

Asked by Amar Myana

I wanted to update php from 5.3 to 5.6. If I ran any command following error message comes:

developer@ubuntu[15:41:55][boot]$ 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-server : Depends: linux-image-3.2.0-75-generic but it is not installed
 linux-server : Depends: linux-headers-server (= 3.2.0.75.89) but 3.2.0.77.91 is installed
E: Unmet dependencies. Try using -f.

I tried to follow this solution but it didn't solve the problem:
https://answers.launchpad.net/ubuntu/+source/update-manager/+question/261126

Following are the helpful details:

1. uname -a

Linux ubuntu 3.2.0-74-generic #109-Ubuntu SMP Tue Dec 9 16:45:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

2. lsb_release -crid

Distributor ID : Ubuntu
Description : Ubuntu 12.04.2 LTS
Release : 12.04
Codename : precise

3. df -h

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu-root 15G 4.3G 9.9G 31% /
udev 992M 8.0K 992M 1% /dev
tmpfs 201M 252K 201M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1002M 0 1002M 0% /run/shm
/dev/sda1 228M 30M 187M 14% /boot

4. df -i

Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/ubuntu-root 985424 309123 676301 32% /
udev 253808 438 253370 1% /dev
tmpfs 256454 327 256127 1% /run
none 256454 5 256449 1% /run/lock
none 256454 1 256453 1% /run/shm
/dev/sda1 124496 208 124288 1% /boot

5. dpkg -l | grep linux-h

ii linux-headers-3.2.0-64 3.2.0-64.97 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-64-generic 3.2.0-64.97 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-65 3.2.0-65.99 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-65-generic 3.2.0-65.99 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-67 3.2.0-67.101 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-67-generic 3.2.0-67.101 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-68 3.2.0-68.102 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-68-generic 3.2.0-68.102 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-69 3.2.0-69.103 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-69-generic 3.2.0-69.103 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-70 3.2.0-70.105 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-70-generic 3.2.0-70.105 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-74 3.2.0-74.109 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-74-generic 3.2.0-74.109 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-75 3.2.0-75.110 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-75-generic 3.2.0-75.110 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-77 3.2.0-77.112 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-77-generic 3.2.0-77.112 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-server 3.2.0.77.91 Linux kernel headers on Server Equipment.

6. dpkg -l | grep linux-i

ii linux-image-2.6.32-28-server 2.6.32-28.55 Linux kernel image for version 2.6.32 on x86_64
ii linux-image-3.2.0-40-generic 3.2.0-40.64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-64-generic 3.2.0-64.97 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-65-generic 3.2.0-65.99 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-67-generic 3.2.0-67.101 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-68-generic 3.2.0-68.102 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-69-generic 3.2.0-69.103 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-70-generic 3.2.0-70.105 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-74-generic 3.2.0-74.109 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-75-generic:i386 3.2.0-75.110 Linux kernel image for version 3.2.0 on 32 bit x86 SMP
ii linux-image-3.2.0-75-generic-pae:i386 3.2.0-75.110 Linux kernel image for version 3.2.0 on 32 bit x86 SMP
iF linux-image-3.2.0-77-generic 3.2.0-77.112 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
iU linux-image-server 3.2.0.75.89 Linux kernel image on Server Equipment.

7. sudo dpkg --audit

The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 linux-image-server Linux kernel image on Server Equipment.
 linux-server Complete Linux kernel on Server Equipment.

The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 linux-image-3.2.0-77-generic Linux kernel image for version 3.2.0 on 64 bit x8

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Amar Myana
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

sudo apt-get --purge remove linux-image-3.2.0-67-generic linux-image-3.2.0-40-generic
sudo apt-get --purge remove linux-image-3.2.0-64-generic linux-image-3.2.0-65-generic
sudo apt-get --purge remove linux-image-3.2.0-68-generic linux-image-3.2.0-69-generic
sudo apt-get --purge autoremove

Should clean up old kernels. If you run:

sudo apt-get --purge remove linux-image-2.6.32-28-server

Does it threaten to remove a lot of packages, or does it just remove the server kernel?

Revision history for this message
Amar Myana (amar-myana-me) said :
#2

It's giving the same error message:

developer@ubuntu[15:57:38][boot]$ sudo apt-get --purge remove linux-image-3.2.0-67-generic linux-image-3.2.0-40-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-server : Depends: linux-image-3.2.0-75-generic but it is not going to be installed
 linux-server : Depends: linux-headers-server (= 3.2.0.75.89) but 3.2.0.77.91 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

developer@ubuntu[15:58:38][boot]$ sudo apt-get --purge 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-server : Depends: linux-image-3.2.0-75-generic but it is not installed
 linux-server : Depends: linux-headers-server (= 3.2.0.75.89) but 3.2.0.77.91 is installed
E: Unmet dependencies. Try using -f.

Revision history for this message
Amar Myana (amar-myana-me) said :
#3

More Information:

developer@ubuntu[15:58:58][boot]$ ll
total 26578
drwxr-xr-x 4 root root 2048 Feb 26 14:33 ./
drwxr-xr-x 24 root root 4096 Feb 26 15:08 ../
-rw-r--r-- 1 root root 796535 Dec 9 22:54 abi-3.2.0-74-generic
-rw-r--r-- 1 root root 140790 Dec 9 22:54 config-3.2.0-74-generic
drwxr-xr-x 3 root root 4096 Feb 26 12:56 grub/
-rw-r--r-- 1 root root 17896003 Dec 25 06:57 initrd.img-3.2.0-74-generic
drwxr-xr-x 2 root root 12288 Aug 30 2012 lost+found/
-rw-r--r-- 1 root root 176764 Nov 27 2011 memtest86+.bin
-rw-r--r-- 1 root root 178944 Nov 27 2011 memtest86+_multiboot.bin
-rw------- 1 root root 2897962 Dec 9 22:54 System.map-3.2.0-74-generic
-rw------- 1 root root 4990768 Dec 9 22:54 vmlinuz-3.2.0-74-generic

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

What is the output of the terminal command

sudo dpkg --configure -a

Revision history for this message
Amar Myana (amar-myana-me) said :
#5

developer@ubuntu[16:27:15][~]$ sudo dpkg --configure -a

Setting up linux-image-3.2.0-77-generic (3.2.0-77.112) ...
Internal Error: Could not find image (/boot/vmlinuz-3.2.0-77-generic)
dpkg: error processing linux-image-3.2.0-77-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-server:
 linux-image-server depends on linux-image-3.2.0-75-generic; however:
  Package linux-image-3.2.0-75-generic is not installed.
dpkg: error processing linux-image-server (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-server:
 linux-server depends on linux-image-server (= 3.2.0.75.89); however:
  Package linux-image-server is not configured yet.
 linux-server depends on linux-headers-server (= 3.2.0.75.89); however:
  Version of linux-headers-server on system is 3.2.0.77.91.
dpkg: error processing linux-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-3.2.0-77-generic
 linux-image-server
 linux-server

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

There seems to be quite some mess in your package management system, with broken dependencies and missing files.

Have you manually deleted files from the /boot directory?

You are running a kernel with 64 bit architecture, why are there the 32 bit packages for the 3.2.0-75 version of the kernel installed? This does not make any sense.

What is the output of
ls /var/cache/apt/archives/linux-*

Revision history for this message
Amar Myana (amar-myana-me) said :
#7

Yes, I had to delete the files from /boot directory.
When I was trying to install package "linux-image-3.2.0-75-generic" it was giving no diskspace error. And when I tried to autoremove it was giving unmet dependency error. So I deleted files manually.

developer@ubuntu[17:00:21][~]$ ls /var/cache/apt/archives/linux-*
/var/cache/apt/archives/linux-headers-server_3.2.0.77.91_amd64.deb /var/cache/apt/archives/linux-server_3.2.0.77.91_amd64.deb
/var/cache/apt/archives/linux-image-server_3.2.0.77.91_amd64.deb

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

Manually removing files from the /boot directory was no good idea, because that has created inconsistencies in your package management system. I am not sure whether it will easily be possible to clean that up. You should have used the package management tools to uninstall obsolete packages, and that would have removed all those files and freed up space on the /boot partition.

Try

cd /var/cache/apt/archives/
sudo dpkg --install linux-headers-server_3.2.0.77.91_amd64.deb linux-server_3.2.0.77.91_amd64.deb linux-image-server_3.2.0.77.91_amd64.deb
sudo dpkg --audit

and copy/paste all output into this question document.
I hope that this will install the current version of the kernel without breaking anything else.

Revision history for this message
Amar Myana (amar-myana-me) said :
#9

Next time, I'll not delete files from /boot manually.

developer@ubuntu[17:18:23][archives]$ sudo dpkg --install linux-headers-server_3.2.0.77.91_amd64.deb linux-server_3.2.0.77.91_amd64.deb linux-image-server_3.2.0.77.91_amd64.deb
(Reading database ... 285389 files and directories currently installed.)
Preparing to replace linux-headers-server 3.2.0.77.91 (using linux-headers-server_3.2.0.77.91_amd64.deb) ...
Unpacking replacement linux-headers-server ...
Preparing to replace linux-server 3.2.0.75.89 (using linux-server_3.2.0.77.91_amd64.deb) ...
Unpacking replacement linux-server ...
Preparing to replace linux-image-server 3.2.0.75.89 (using linux-image-server_3.2.0.77.91_amd64.deb) ...
Unpacking replacement linux-image-server ...
Setting up linux-headers-server (3.2.0.77.91) ...
dpkg: dependency problems prevent configuration of linux-image-server:
 linux-image-server depends on linux-image-3.2.0-77-generic; however:
  Package linux-image-3.2.0-77-generic is not configured yet.
dpkg: error processing linux-image-server (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-server:
 linux-server depends on linux-image-server (= 3.2.0.77.91); however:
  Package linux-image-server is not configured yet.
dpkg: error processing linux-server (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-server
 linux-server

developer@ubuntu[17:18:38][archives]$ sudo dpkg --audit
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 linux-image-server Linux kernel image on Server Equipment.
 linux-server Complete Linux kernel on Server Equipment.

The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 linux-image-3.2.0-77-generic Linux kernel image for version 3.2.0 on 64 bit x8

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

Ok, try

sudo apt-get install --download-only linux-image-3.2.0-77-generic
cd /var/cache/apt/archives/
sudo dpkg --install linux-image-3.2.0-77-generic_3.2.0-77.112_amd64.deb
sudo dpkg --configure -a
sudo dpkg --audit

and report the outcome

Revision history for this message
Amar Myana (amar-myana-me) said :
#11

developer@ubuntu[17:28:33][~]$ sudo apt-get install --download-only linux-image-3.2.0-77-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-image-3.2.0-77-generic is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-image-3.2.0-68-generic linux-headers-3.2.0-70-generic linux-headers-3.2.0-65-generic linux-headers-3.2.0-64 linux-headers-3.2.0-70 linux-headers-3.2.0-65
  linux-headers-3.2.0-67 linux-headers-3.2.0-68 linux-headers-3.2.0-69 linux-headers-3.2.0-68-generic linux-image-3.2.0-69-generic linux-image-3.2.0-64-generic
  linux-headers-3.2.0-69-generic linux-image-3.2.0-67-generic linux-headers-3.2.0-64-generic linux-headers-3.2.0-67-generic linux-image-3.2.0-70-generic
  linux-image-3.2.0-65-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 145 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Download complete and in download only mode

developer@ubuntu[17:29:49][archives]$ sudo dpkg --install linux-image-3.2.0-77-generic_3.2.0-77.112_amd64.deb
dpkg: error processing linux-image-3.2.0-77-generic_3.2.0-77.112_amd64.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 linux-image-3.2.0-77-generic_3.2.0-77.112_amd64.deb

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

what is the output of

ls -l ls /var/cache/apt/archives/linux-*

Revision history for this message
Amar Myana (amar-myana-me) said :
#13

developer@ubuntu[17:37:34][archives]$ ls -l /var/cache/apt/archives/linux-*

-rw-r--r-- 1 root root 2412 Feb 12 23:04 /var/cache/apt/archives/linux-headers-server_3.2.0.77.91_amd64.deb
-rw-r--r-- 1 root root 2420 Feb 12 23:04 /var/cache/apt/archives/linux-image-server_3.2.0.77.91_amd64.deb
-rw-r--r-- 1 root root 1732 Feb 12 23:04 /var/cache/apt/archives/linux-server_3.2.0.77.91_amd64.deb

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

Where did your system put that downloaded .deb file?

What is the output of
ls -l ~/linux-*.deb

Revision history for this message
Amar Myana (amar-myana-me) said :
#15

It's not in home directory.

And I've searched entire system for it. I didn't find it.

developer@ubuntu[17:48:36][~]$ locate linux-image- | grep 7
/usr/share/doc/linux-image-3.2.0-67-generic
/usr/share/doc/linux-image-3.2.0-70-generic
/usr/share/doc/linux-image-3.2.0-74-generic
/usr/share/doc/linux-image-3.2.0-67-generic/changelog.Debian.gz
/usr/share/doc/linux-image-3.2.0-67-generic/copyright
/usr/share/doc/linux-image-3.2.0-70-generic/changelog.Debian.gz
/usr/share/doc/linux-image-3.2.0-70-generic/copyright
/usr/share/doc/linux-image-3.2.0-74-generic/changelog.Debian.gz
/usr/share/doc/linux-image-3.2.0-74-generic/copyright
/var/lib/dpkg/info/linux-image-3.2.0-67-generic.list
/var/lib/dpkg/info/linux-image-3.2.0-67-generic.md5sums
/var/lib/dpkg/info/linux-image-3.2.0-67-generic.postinst
/var/lib/dpkg/info/linux-image-3.2.0-67-generic.postrm
/var/lib/dpkg/info/linux-image-3.2.0-67-generic.preinst
/var/lib/dpkg/info/linux-image-3.2.0-67-generic.prerm
/var/lib/dpkg/info/linux-image-3.2.0-70-generic.list
/var/lib/dpkg/info/linux-image-3.2.0-70-generic.md5sums
/var/lib/dpkg/info/linux-image-3.2.0-70-generic.postinst
/var/lib/dpkg/info/linux-image-3.2.0-70-generic.postrm
/var/lib/dpkg/info/linux-image-3.2.0-70-generic.preinst
/var/lib/dpkg/info/linux-image-3.2.0-70-generic.prerm
/var/lib/dpkg/info/linux-image-3.2.0-74-generic.list
/var/lib/dpkg/info/linux-image-3.2.0-74-generic.md5sums
/var/lib/dpkg/info/linux-image-3.2.0-74-generic.postinst
/var/lib/dpkg/info/linux-image-3.2.0-74-generic.postrm
/var/lib/dpkg/info/linux-image-3.2.0-74-generic.preinst
/var/lib/dpkg/info/linux-image-3.2.0-74-generic.prerm

Revision history for this message
Manfred Hampl (m-hampl) said :
#16

ok, then let's do manually:

cd ~
wget http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-image-3.2.0-77-generic_3.2.0-77.112_amd64.deb
sudo dpkg --install ~/linux-image-3.2.0-77-generic_3.2.0-77.112_amd64.deb
sudo dpkg --configure -a
sudo dpkg --audit

and report the outcome.

Revision history for this message
Amar Myana (amar-myana-me) said :
#17

developer@ubuntu[18:20:06][~]$ sudo dpkg --install ~/linux-image-3.2.0-77-generic_3.2.0-77.112_amd64.deb

(Reading database ... 285389 files and directories currently installed.)
Preparing to replace linux-image-3.2.0-77-generic 3.2.0-77.112 (using .../linux-image-3.2.0-77-generic_3.2.0-77.112_amd64.deb) ...
Done.
Unpacking replacement linux-image-3.2.0-77-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-77-generic /boot/vmlinuz-3.2.0-77-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-77-generic /boot/vmlinuz-3.2.0-77-generic
Setting up linux-image-3.2.0-77-generic (3.2.0-77.112) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.2.0-77-generic /boot/vmlinuz-3.2.0-77-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-77-generic /boot/vmlinuz-3.2.0-77-generic
update-initramfs: Generating /boot/initrd.img-3.2.0-77-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.2.0-77-generic /boot/vmlinuz-3.2.0-77-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-77-generic /boot/vmlinuz-3.2.0-77-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-77-generic
Found initrd image: /boot/initrd.img-3.2.0-77-generic
Found linux image: /boot/vmlinuz-3.2.0-74-generic
Found initrd image: /boot/initrd.img-3.2.0-74-generic
Found memtest86+ image: /memtest86+.bin
done

developer@ubuntu[18:26:59][~]$ sudo dpkg --configure -a

Setting up linux-image-server (3.2.0.77.91) ...
Setting up linux-server (3.2.0.77.91) ...

developer@ubuntu[18:27:21][~]$ sudo dpkg --audit

developer@ubuntu[18:27:27][~]$

I think it solved the problem.

Any last cleanup commands or things need to be take care

Revision history for this message
Manfred Hampl (m-hampl) said :
#18

Yes, the package management system itself seems to be in a consistent state again, with all dependencies satisfied.
The only question is how it will cope with files that are missing in packages that are due for uninstalling.

You just installed a new version of the kernel, so you should reboot to activate it (if you have not yet done this).

To identify the obsolete packages, please provide the output of the commands

dpkg -l | grep ' linux-'

Revision history for this message
Amar Myana (amar-myana-me) said :
#19

I rebooted the machine.

developer@ubuntu[19:02:15][~]$ uname -a
Linux ubuntu 3.2.0-77-generic #112-Ubuntu SMP Tue Feb 10 15:22:22 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

developer@ubuntu[19:02:21][~]$ dpkg -l | grep 'linux-'
ii linux-firmware 1.79.16 Firmware for Linux kernel drivers
ii linux-headers-3.2.0-64 3.2.0-64.97 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-64-generic 3.2.0-64.97 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-65 3.2.0-65.99 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-65-generic 3.2.0-65.99 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-67 3.2.0-67.101 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-67-generic 3.2.0-67.101 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-68 3.2.0-68.102 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-68-generic 3.2.0-68.102 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-69 3.2.0-69.103 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-69-generic 3.2.0-69.103 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-70 3.2.0-70.105 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-70-generic 3.2.0-70.105 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-74 3.2.0-74.109 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-74-generic 3.2.0-74.109 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-75 3.2.0-75.110 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-75-generic 3.2.0-75.110 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-77 3.2.0-77.112 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-77-generic 3.2.0-77.112 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-server 3.2.0.77.91 Linux kernel headers on Server Equipment.
ii linux-image-2.6.32-28-server 2.6.32-28.55 Linux kernel image for version 2.6.32 on x86_64
ii linux-image-3.2.0-40-generic 3.2.0-40.64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-64-generic 3.2.0-64.97 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-65-generic 3.2.0-65.99 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-67-generic 3.2.0-67.101 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-68-generic 3.2.0-68.102 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-69-generic 3.2.0-69.103 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-70-generic 3.2.0-70.105 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-74-generic 3.2.0-74.109 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-75-generic:i386 3.2.0-75.110 Linux kernel image for version 3.2.0 on 32 bit x86 SMP
ii linux-image-3.2.0-75-generic-pae:i386 3.2.0-75.110 Linux kernel image for version 3.2.0 on 32 bit x86 SMP
ii linux-image-3.2.0-77-generic 3.2.0-77.112 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-server 3.2.0.77.91 Linux kernel image on Server Equipment.
ii linux-libc-dev 3.2.0-75.110 Linux Kernel Headers for development
ii linux-server 3.2.0.77.91 Complete Linux kernel on Server Equipment.

Revision history for this message
Manfred Hampl (m-hampl) said :
#20

I think the following command should clean up the old kernel packages:

(copy / paste the whole block ant once)

sudo dpkg --purge \
linux-headers-3.2.0-64 \
linux-headers-3.2.0-64-generic \
linux-headers-3.2.0-65 \
linux-headers-3.2.0-65-generic \
linux-headers-3.2.0-67 \
linux-headers-3.2.0-67-generic \
linux-headers-3.2.0-68 \
linux-headers-3.2.0-68-generic \
linux-headers-3.2.0-69 \
linux-headers-3.2.0-69-generic \
linux-headers-3.2.0-70 \
linux-headers-3.2.0-70-generic \
linux-headers-3.2.0-75 \
linux-headers-3.2.0-75-generic \
linux-image-2.6.32-28-server \
linux-image-3.2.0-40-generic \
linux-image-3.2.0-64-generic \
linux-image-3.2.0-65-generic \
linux-image-3.2.0-67-generic \
linux-image-3.2.0-68-generic \
linux-image-3.2.0-69-generic \
linux-image-3.2.0-70-generic \
linux-image-3.2.0-75-generic:i386 \
linux-image-3.2.0-75-generic-pae:i386

Afterwards please provide the output of

uname -a
dpkg -l | grep ' linux-'
ls -l /boot
df -h

for checking the status of your system after all those changes.

Revision history for this message
Amar Myana (amar-myana-me) said :
#21

developer@ubuntu[19:24:07][~]$ uname -a
Linux ubuntu 3.2.0-77-generic #112-Ubuntu SMP Tue Feb 10 15:22:22 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

developer@ubuntu[19:24:14][~]$ dpkg -l | grep ' linux-'
ii linux-firmware 1.79.16 Firmware for Linux kernel drivers
ii linux-headers-3.2.0-74 3.2.0-74.109 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-74-generic 3.2.0-74.109 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-3.2.0-77 3.2.0-77.112 Header files related to Linux kernel version 3.2.0
ii linux-headers-3.2.0-77-generic 3.2.0-77.112 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii linux-headers-server 3.2.0.77.91 Linux kernel headers on Server Equipment.
ii linux-image-3.2.0-74-generic 3.2.0-74.109 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-77-generic 3.2.0-77.112 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-server 3.2.0.77.91 Linux kernel image on Server Equipment.
ii linux-libc-dev 3.2.0-75.110 Linux Kernel Headers for development
ii linux-server 3.2.0.77.91 Complete Linux kernel on Server Equipment.

developer@ubuntu[19:24:27][~]$ ls -l /boot
total 52784
-rw-r--r-- 1 root root 796535 Dec 9 22:54 abi-3.2.0-74-generic
-rw-r--r-- 1 root root 796597 Feb 10 21:17 abi-3.2.0-77-generic
-rw-r--r-- 1 root root 140790 Dec 9 22:54 config-3.2.0-74-generic
-rw-r--r-- 1 root root 140790 Feb 10 21:17 config-3.2.0-77-generic
drwxr-xr-x 3 root root 4096 Feb 26 19:23 grub
-rw-r--r-- 1 root root 17896003 Dec 25 06:57 initrd.img-3.2.0-74-generic
-rw-r--r-- 1 root root 17902537 Feb 26 18:26 initrd.img-3.2.0-77-generic
drwxr-xr-x 2 root root 12288 Aug 30 2012 lost+found
-rw-r--r-- 1 root root 176764 Nov 27 2011 memtest86+.bin
-rw-r--r-- 1 root root 178944 Nov 27 2011 memtest86+_multiboot.bin
-rw------- 1 root root 2897962 Dec 9 22:54 System.map-3.2.0-74-generic
-rw------- 1 root root 2898503 Feb 10 21:17 System.map-3.2.0-77-generic
-rw------- 1 root root 4990768 Dec 9 22:54 vmlinuz-3.2.0-74-generic
-rw------- 1 root root 4990960 Feb 10 21:17 vmlinuz-3.2.0-77-generic

developer@ubuntu[19:24:44][~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu-root 15G 2.3G 12G 17% /
udev 992M 12K 992M 1% /dev
tmpfs 201M 244K 201M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1002M 0 1002M 0% /run/shm
/dev/sda1 228M 56M 161M 26% /boot

Revision history for this message
Manfred Hampl (m-hampl) said :
#22

Ok. This looks fine.

The only action still outstanding is to do the remaining package updates ("... 0 upgraded, 0 newly installed, 0 to remove and 145 not upgraded..."). It is up to you when you want to start the updates. With a consistent package management the "sudo apt-get update && sudo apt-get dist-upgrade" command should be able to do that.

And finally:
You have to keep an eye on the available free space on the /boot partition.
Whenever the updates process install a new kernel version, you should uninstall the oldest one, keeping just two kernel versions installed.

Revision history for this message
Amar Myana (amar-myana-me) said :
#23

Thanks a lot.