Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ericus@greentic:~$ sudo dpkg -l linux-{image,headers}-* | awk '/^ii/{print $2}' | egrep '[0-9]+\.[0-9]+\.[0-9]+' | awk 'BEGIN{FS="-"}; {if ($3 ~ /[0-9]+/) print $3"-"$4,$0; else if ($4 ~ /[0-9]+/) print $4"-"$5,$0}' | sort -k1,1 --version-sort -r | sed -e "1,/$(uname -r | cut -f1,2 -d"-")/d" | grep -v -e `uname -r | cut -f1,2 -d"-"` | awk '{print $2}' | xargs sudo apt-get -y purge
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following packages will be REMOVED:
- linux-headers-4.4.0-81* linux-headers-4.4.0-81-generic* linux-image-4.4.0-81-generic* linux-image-extra-4.4.0-81-generic*
- linux-signed-image-4.4.0-81-generic*
- 0 upgraded, 0 newly installed, 5 to remove and 15 not upgraded.
- After this operation, 297 MB disk space will be freed.
- (Reading database ... 296297 files and directories currently installed.)
- Removing linux-headers-4.4.0-81-generic (4.4.0-81.104) ...
- Removing linux-headers-4.4.0-81 (4.4.0-81.104) ...
- Removing linux-signed-image-4.4.0-81-generic (4.4.0-81.104) ...
- Generating grub configuration file ...
- Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
- Found linux image: /boot/vmlinuz-4.4.0-83-generic
- Found initrd image: /boot/initrd.img-4.4.0-83-generic
- Found linux image: /boot/vmlinuz-4.4.0-81-generic
- Found initrd image: /boot/initrd.img-4.4.0-81-generic
- Adding boot menu entry for EFI firmware configuration
- done
- Purging configuration files for linux-signed-image-4.4.0-81-generic (4.4.0-81.104) ...
- Removing linux-image-extra-4.4.0-81-generic (4.4.0-81.104) ...
- run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-81-generic /boot/vmlinuz-4.4.0-81-generic
- run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-81-generic /boot/vmlinuz-4.4.0-81-generic
- Error! Your kernel headers for kernel 4.4.0-81-generic cannot be found.
- Please install the linux-headers-4.4.0-81-generic package,
- or use the --kernelsourcedir option to tell DKMS where it's located
- run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-81-generic /boot/vmlinuz-4.4.0-81-generic
- update-initramfs: Generating /boot/initrd.img-4.4.0-81-generic
- run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-81-generic /boot/vmlinuz-4.4.0-81-generic
- run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-81-generic /boot/vmlinuz-4.4.0-81-generic
- run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-81-generic /boot/vmlinuz-4.4.0-81-generic
- run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-81-generic /boot/vmlinuz-4.4.0-81-generic
- Generating grub configuration file ...
- Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
- Found linux image: /boot/vmlinuz-4.4.0-83-generic
- Found initrd image: /boot/initrd.img-4.4.0-83-generic
- Found linux image: /boot/vmlinuz-4.4.0-81-generic
- Found initrd image: /boot/initrd.img-4.4.0-81-generic
- Adding boot menu entry for EFI firmware configuration
- done
- Purging configuration files for linux-image-extra-4.4.0-81-generic (4.4.0-81.104) ...
- Removing linux-image-4.4.0-81-generic (4.4.0-81.104) ...
- Examining /etc/kernel/prerm.d.
- run-parts: executing /etc/kernel/prerm.d/dkms 4.4.0-81-generic /boot/vmlinuz-4.4.0-81-generic
- dkms: removing: bbswitch 0.8 (4.4.0-81-generic) (x86_64)
- -------- Uninstall Beginning --------
- Module: bbswitch
- Version: 0.8
- Kernel: 4.4.0-81-generic (x86_64)
- -------------------------------------
- Status: Before uninstall, this module version was ACTIVE on this kernel.
- bbswitch.ko:
- - Uninstallation
- - Deleting from: /lib/modules/4.4.0-81-generic/updates/dkms/
- - Original module
- - No original module was found for this module on this kernel.
- - Use the dkms install command to reinstall any previous module version.
- depmod....
- DKMS: uninstall completed.
- Examining /etc/kernel/postrm.d .
- run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-81-generic /boot/vmlinuz-4.4.0-81-generic
- update-initramfs: Deleting /boot/initrd.img-4.4.0-81-generic
- run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-81-generic /boot/vmlinuz-4.4.0-81-generic
- Generating grub configuration file ...
- Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
- Found linux image: /boot/vmlinuz-4.4.0-83-generic
- Found initrd image: /boot/initrd.img-4.4.0-83-generic
- Adding boot menu entry for EFI firmware configuration
- 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]
- Purging configuration files for linux-image-4.4.0-81-generic (4.4.0-81.104) ...
- Examining /etc/kernel/postrm.d .
- run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-81-generic /boot/vmlinuz-4.4.0-81-generic
- run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-81-generic /boot/vmlinuz-4.4.0-81-generic
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement