$ sudo apt-get install linux-headers-generic Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: linux-headers-3.13.0-46 linux-headers-3.13.0-46-generic The following packages will be REMOVED: linux-image-extra-3.13.0-44-generic The following NEW packages will be installed: linux-headers-3.13.0-46 linux-headers-3.13.0-46-generic The following packages will be upgraded: linux-headers-generic 1 upgraded, 2 newly installed, 1 to remove and 52 not upgraded. 8 not fully installed or removed. Need to get 9.605 kB of archives. After this operation, 75,2 MB disk space will be freed. Do you want to continue? [Y/n] Get:1 http://br.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-3.13.0-46 all 3.13.0-46.75 [8.888 kB] Get:2 http://br.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-3.13.0-46-generic amd64 3.13.0-46.75 [714 kB] Get:3 http://br.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-generic amd64 3.13.0.46.53 [2.852 B] Fetched 9.605 kB in 22s (424 kB/s) (Reading database ... 700059 files and directories currently installed.) Removing linux-image-extra-3.13.0-44-generic (3.13.0-44.73) ... run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-44-generic /boot/vmlinuz-3.13.0-44-generic run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-44-generic /boot/vmlinuz-3.13.0-44-generic Error! Your kernel headers for kernel 3.13.0-44-generic cannot be found. Please install the linux-headers-3.13.0-44-generic package, or use the --kernelsourcedir option to tell DKMS where it's located run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-44-generic /boot/vmlinuz-3.13.0-44-generic update-initramfs: Generating /boot/initrd.img-3.13.0-44-generic cp: cannot stat ‘/sbin/rmmod’: No such file or directory E: /usr/share/initramfs-tools/hooks/kmod failed with return 1. update-initramfs: failed for /boot/initrd.img-3.13.0-44-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-extra-3.13.0-44-generic (--remove): subprocess installed post-removal script returned error exit status 1 E: Sub-process /usr/bin/dpkg returned an error code (1)