Soup auto remove?

191 views
Skip to first unread message

bug...@gmail.com

unread,
Mar 16, 2016, 12:20:17 PM3/16/16
to security-onion
Hi,

Having recently done a "sudo soup" to update SO I noticed it ended up with success but also with the following info:

The following packages were automatically installed and are no longer required:
gir1.2-json-1.0 gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 libtimezonemap1
linux-headers-3.19.0-43 linux-headers-3.19.0-49 linux-headers-3.19.0-51
linux-headers-3.19.0-51-generic linux-image-3.19.0-51-generic
linux-image-extra-3.19.0-51-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
###########################################################################
All updates have been installed.

Usually I would just do a "sudo apt-get autoremove" but as we are told to use "sudo soup" rather than "sudo apt-get dist-upgrade" I am assuming we shoudln't be doing that?

I don't think it is very important, but as I like to remove unecessary packages I am wondering if there is an option for soup to remove those packages?

Thanks.
B.

Doug Burks

unread,
Mar 17, 2016, 8:43:04 AM3/17/16
to securit...@googlegroups.com
Hi Bugs,

You should be able to safely do a "sudo apt-get autoremove".
> --
> Follow Security Onion on Twitter!
> https://twitter.com/securityonion
> ---
> You received this message because you are subscribed to the Google Groups "security-onion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to security-onio...@googlegroups.com.
> To post to this group, send email to securit...@googlegroups.com.
> Visit this group at https://groups.google.com/group/security-onion.
> For more options, visit https://groups.google.com/d/optout.



--
Doug Burks

bug...@gmail.com

unread,
Mar 19, 2016, 10:04:25 AM3/19/16
to security-onion
Thanks Doug,
I thought I'd better check before breaking anything :)
B.

Alessandro Di Giuseppe

unread,
Jul 10, 2016, 5:05:00 PM7/10/16
to security-onion
Hi Doug,

FYI, I've had bad experience with this on virtualized Security Onion instances... I thought it was only on Hyper-V and Xensever, but I've also seen it on VMware.

</snip>
user@securityonion:~$ sudo apt-get autoremove
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
gir1.2-json-1.0 gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 libtimezonemap1
linux-headers-3.19.0-43 linux-headers-3.19.0-43-generic
linux-image-3.19.0-43-generic linux-image-extra-3.19.0-43-generic
0 upgraded, 0 newly installed, 8 to remove and 0 not upgraded.
After this operation, 293 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 151670 files and directories currently installed.)
Removing gir1.2-timezonemap-1.0 (0.4.1) ...
Removing gir1.2-json-1.0 (0.16.2-1ubuntu1) ...
Removing gir1.2-xkl-1.0 (5.4-0ubuntu1) ...
Removing libtimezonemap1 (0.4.1) ...
Removing linux-headers-3.19.0-43-generic (3.19.0-43.49~14.04.1) ...
Removing linux-headers-3.19.0-43 (3.19.0-43.49~14.04.1) ...
Removing linux-image-extra-3.19.0-43-generic (3.19.0-43.49~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-43-generic /boot/vmlinuz-3.19.0-43-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.19.0-43-generic /boot/vmlinuz-3.19.0-43-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-43-generic /boot/vmlinuz-3.19.0-43-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-43-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.19.0-43-generic /boot/vmlinuz-3.19.0-43-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.19.0-43-generic /boot/vmlinuz-3.19.0-43-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.19.0-43-generic /boot/vmlinuz-3.19.0-43-generic
Generating grub configuration file ...
Found background: /etc/PinguyBuilder/grub.png
Found background image: /etc/PinguyBuilder/grub.png
Found linux image: /boot/vmlinuz-3.19.0-43-generic
Found initrd image: /boot/initrd.img-3.19.0-43-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
Removing linux-image-3.19.0-43-generic (3.19.0-43.49~14.04.1) ...
WARN: Proceeding with removing running kernel image.
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 3.19.0-43-generic /boot/vmlinuz-3.19.0-43-generic
dkms: removing: pf_ring 6 (3.19.0-43-generic) (x86_64)

-------- Uninstall Beginning --------
Module: pf_ring
Version: 6
Kernel: 3.19.0-43-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

pf_ring.ko:
- Uninstallation
- Deleting from: /lib/modules/3.19.0-43-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.

------------------------------
Deleting module version: 6
completely from the DKMS tree.
------------------------------
Done.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.19.0-43-generic /boot/vmlinuz-3.19.0-43-generic
update-initramfs: Deleting /boot/initrd.img-3.19.0-43-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.19.0-43-generic /boot/vmlinuz-3.19.0-43-generic
Generating grub configuration file ...
Found background: /etc/PinguyBuilder/grub.png
Found background image: /etc/PinguyBuilder/grub.png
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
The link /vmlinuz is a damaged link
Removing symbolic link vmlinuz
you may need to re-run your boot loader[grub]
The link /initrd.img is a damaged link
Removing symbolic link initrd.img
you may need to re-run your boot loader[grub]
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
</snip>


<snip>
root@securityonion:~# soup
###########################################################################
This script will automatically install all available updates
and remove any old kernels (keeping at least two kernels).

For distributed deployments, please ensure this script is
run on the master server before updating sensors.

If mysql-server updates are available, it will stop sensor processes
to ensure a clean update.

At the end of the script, if mysql-server and/or kernel updates
were installed, you will be prompted to reboot.
###########################################################################

Press Enter to continue or Ctrl-C to cancel.

Checking for kernels that can be removed...
ls: cannot access /boot/vmlinuz-*: No such file or directory
No kernels are eligible for removal

Checking for updates...
</snip>


Alessandro

On Thursday, March 17, 2016 at 8:43:04 AM UTC-4, Doug Burks wrote:
> Hi Bugs,
>
> You should be able to safely do a "sudo apt-get autoremove".
>

Doug Burks

unread,
Jul 11, 2016, 6:21:37 AM7/11/16
to securit...@googlegroups.com
Hi Alessandro,

I was assuming that autoremove would be smart enough to not remove all
kernels, but it looks like that was an incorrect assumption. I've
created the following issue to remove any autoremove recommendations
from soup output:
https://github.com/Security-Onion-Solutions/security-onion/issues/961

Alessandro Di Giuseppe

unread,
Jul 11, 2016, 11:41:11 AM7/11/16
to security-onion
Hi Doug,

Thanks, that will probably save others like me and Bugs some headaches!

Regards,

Alessandro

Jon Mark Allen

unread,
Aug 21, 2016, 11:47:22 PM8/21/16
to security-onion
On Monday, July 11, 2016 at 5:21:37 AM UTC-5, Doug Burks wrote:
> Hi Alessandro,
>
> I was assuming that autoremove would be smart enough to not remove all
> kernels, but it looks like that was an incorrect assumption. I've
> created the following issue to remove any autoremove recommendations
> from soup output:
> https://github.com/Security-Onion-Solutions/security-onion/issues/961
>

This bug came up to bite me this week. After recovering, I noticed I also needed to update my HWE stack which then upgraded the system to the 4.4 kernel. After that upgrade, the autoremove worked as designed. :-)

I noticed the HWE instructions for Security Onion state the HWE stack isn't a problem if we installed from the SO ISO (http://blog.securityonion.net/2014/08/ubuntu-hardware-enablement-hwe-stacks.html), but I did that and still had to upgrade. Perhaps that's different with the 14.04 install? Or maybe there's an updated SO post on the 1404 HWE...

JM

Reply all
Reply to author
Forward
0 new messages