sudo apt-get purge bind9 bind9-doc bind9-host
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'bind9' is not installed, so not removed
Package 'bind9-doc' is not installed, so not removed
Package 'bind9-host' is not installed, so not removed
The following packages were automatically installed and are no longer required:
linux-headers-3.16.0-45 linux-headers-3.16.0-45-generic
linux-image-3.16.0-45-generic linux-image-extra-3.16.0-45-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
lester@ubuntusvr:~$ apt-get autoremove
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
lester@ubuntusvr:~$ sudo apt-get purge bind9 bind9-doc bind9-host
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'bind9' is not installed, so not removed
Package 'bind9-doc' is not installed, so not removed
Package 'bind9-host' is not installed, so not removed
The following packages were automatically installed and are no longer required:
linux-headers-3.16.0-45 linux-headers-3.16.0-45-generic
linux-image-3.16.0-45-generic linux-image-extra-3.16.0-45-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
lester@ubuntusvr:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-headers-3.16.0-45 linux-headers-3.16.0-45-generic
linux-image-3.16.0-45-generic linux-image-extra-3.16.0-45-generic
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 280 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 371764 files and directories currently installed.)
Removing linux-headers-3.16.0-45-generic (3.16.0-45.60~14.04.1) ...
Removing linux-headers-3.16.0-45 (3.16.0-45.60~14.04.1) ...
Removing linux-image-extra-3.16.0-45-generic (3.16.0-45.60~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-45-generic /boot/vmlinuz-3.16.0-45-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-45-generic /boot/vmlinuz-3.16.0-45-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-45-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.16.0-45-generic /boot/vmlinuz-3.16.0-45-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.16.0-45-generic /boot/vmlinuz-3.16.0-45-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.16.0-45-generic /boot/vmlinuz-3.16.0-45-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.16.0-49-generic
Found initrd image: /boot/initrd.img-3.16.0-49-generic
Found linux image: /boot/vmlinuz-3.16.0-45-generic
Found initrd image: /boot/initrd.img-3.16.0-45-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows Recovery Environment (loader) on /dev/sda1
Found Ubuntu 14.04.2 LTS (14.04) on /dev/sda5
done
Removing linux-image-3.16.0-45-generic (3.16.0-45.60~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-45-generic /boot/vmlinuz-3.16.0-45-generic
update-initramfs: Deleting /boot/initrd.img-3.16.0-45-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-45-generic /boot/vmlinuz-3.16.0-45-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.16.0-49-generic
Found initrd image: /boot/initrd.img-3.16.0-49-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows Recovery Environment (loader) on /dev/sda1
Found Ubuntu 14.04.2 LTS (14.04) on /dev/sda5
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]
lester@ubuntusvr:~$