How can I install and remove an rpm package in one command?

Solution In Progress - Updated -

Issue

I would like to replace sendmail with postfix. If I try to remove sendmail, rpm complains that I cannot remove it becauseo cronie and other packages depend on it. How can I remove sendmail and install postfix in one single command?

Environment

  • Red Hat Enterprise Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content