Questions for running 'rpm' -e in %pre

Huo QiFeng huoqifeng at
Wed Jul 21 05:57:18 UTC 2010

You may backup configure files via shell script, rather than "rpm -e ...", I
did not see the necessary to previous uninstallation within %pre section.
Section %prerm of older relase will be operated when you upgrade your
package.... Where you can do what you want.

On Tue, Jun 22, 2010 at 12:08 AM, FlorianFesti <ffesti at> wrote:

> On 04/29/2010 09:03 AM, WangXinpeng wrote:
>> Hi,
>>   I have a question what about running 'rpm' command in the script of
>> %pre.
>>   Now, I need create a RPM package to upgrade the old version of our
>> product to newest version. At first, we should backup old configuration and
>> uninstall old version of our product. so, I write the script in %pre to run
>> 'rpm -e XXX'.
> In general this should not be necessary. You can do the backup of the data
> within the %pre script of the new version. If the package gets updated the
> old version is removed afterwards. RPM takes care that only left over files
> get deleted and the new ones stay.
> Of course you can get into trouble if the old packges is broken. If you
> explain your actual problem we might come up with another solution than
> calling rpm -e.
> Florian
> _______________________________________________
> Rpm-list mailing list
> Rpm-list at

Best Regards
Huo QiFeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Rpm-list mailing list