Linux - remove extra kernel versions action language syntax

(imported topic written by avogel91)

I’ve been attempting to create a fixlet to run an rpm -e command using the BigFix action script to automatically remove kernels older than X version.

For example…I can write an analysis that spits out a list of old kernels.


concatenation " " of (packages “kernel” whose (version of it <= “2.6.9-55.EL”) of rpm)


2.6.9-42.0.8.EL 2.6.9-42.EL 2.6.9-55.EL

This is the action script that I tried to use to remove the old kernels:

wait rpm -e “{concatenation " " of {packages “kernel” whose {version of it <= “2.6.9-55.EL”} of rpm as string}”

I’m hoping I just have bad syntax. What might be going on here? Is there anyway do a QnA for action script language syntax checking?

Any thoughts or ideas anyone? Thanks all.

(imported comment written by avogel91)

I was able to correct this…it was a syntax issue.

I realize now the {} quotations go around your action script statement that you want to resolve.

So…if you want to remove old versions of kernels on your Linux machines, run this:

// Remove rpms older or equal to version 2.6.9-42

wait rpm -e {concatenation " " of (packages “kernel” whose (version of it <= “2.6.9-42.EL”) of rpm as string)}

Good luck to you all.