Uninstall Package in linux

Hello,

I’m trying to remove some package from Linux servers.
I write in the action:
wait rpm -e $(rpm -qa ‘xxx*’)

when I deploy the fixlet, it shows as completed but it didn’t remove the package.

can you please help me?

Thanks,
Ortal

Does it work on the command line if you execute it manually?

“Completed” just means that it ran the command, but it would say that even if the command does nothing at all.

Try redirecting to a log file and check the log for the RPM command.

I wonder whether it’s shell-dependent to do the $ substitution? Maybe try something along the lines of

wait /bin/bash -c rpm -e $(rpm -qa 'xxx*')

(and maybe get into the maze of quote-escaping on the command line)

1 Like

This is a good point… if the $(rpm -qa 'xxx*') returns a results with a space, then it probably needs quotes.