andrei@andrei-desktop:~$ sudo apt-get autoremove
[sudo] password for andrei:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-headers-4.2.0-27 linux-headers-4.2.0-27-generic
linux-image-4.2.0-27-generic linux-image-extra-4.2.0-27-generic
0 upgraded, 0 newly installed, 4 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 287 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 224140 files and directories currently installed.)
Removing linux-headers-4.2.0-27-generic (4.2.0-27.32) ...
Removing linux-headers-4.2.0-27 (4.2.0-27.32) ...
Removing linux-image-extra-4.2.0-27-generic (4.2.0-27.32) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
Error! Your kernel headers for kernel 4.2.0-27-generic cannot be found.
Please install the linux-headers-4.2.0-27-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
update-initramfs: Generating /boot/initrd.img-4.2.0-27-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.2.0-30-generic
Found initrd image: /boot/initrd.img-4.2.0-30-generic
Found linux image: /boot/vmlinuz-4.2.0-27-generic
Found initrd image: /boot/initrd.img-4.2.0-27-generic
Found Windows 10 (loader) on /dev/sda1
Found linux image: /boot/vmlinuz-4.2.0-30-generic
Found initrd image: /boot/initrd.img-4.2.0-30-generic
Found linux image: /boot/vmlinuz-4.2.0-27-generic
Found initrd image: /boot/initrd.img-4.2.0-27-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
Removing linux-image-4.2.0-27-generic (4.2.0-27.32) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
update-initramfs: Deleting /boot/initrd.img-4.2.0-27-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.2.0-30-generic
Found initrd image: /boot/initrd.img-4.2.0-30-generic
Found Windows 10 (loader) on /dev/sda1
Found linux image: /boot/vmlinuz-4.2.0-30-generic
Found initrd image: /boot/initrd.img-4.2.0-30-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
you may need to re-run your boot loader[grub]
Setting up nvidia-361 (361.28-0ubuntu1~gpu15.10.1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-361
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Adding system user `nvidia-persistenced' (UID 123) ...
Adding new user `nvidia-persistenced' (UID 123) with group `nvidia-persistenced' ...
useradd: existing lock file /etc/passwd.lock without a PID
useradd: cannot lock /etc/passwd; try again later.
adduser: `/usr/sbin/useradd -d / -g nvidia-persistenced -s /sbin/nologin -u 123 nvidia-persistenced' returned error code 1. Exiting.
dpkg: error processing package nvidia-361 (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for initramfs-tools (0.120ubuntu6) ...
update-initramfs: Generating /boot/initrd.img-4.2.0-30-generic
Errors were encountered while processing:
nvidia-361
E: Sub-process /usr/bin/dpkg returned an error code (1)