I want to create one rpm with rpmbuild which can remove some others rpm in system forcefully.
How can i integrate rpm -e –nodeps packagename.rpm command in specfile?
This should generally only be done when a software package is being renamed. If you try to use this to remove other software, you will break someone’s system, and administrators will curse you forever…
In this case, use the
Obsoletes directive in your spec file.
For instance, in an example package
Name: wireshark Obsoletes: ethereal
(The old name of Wireshark was Ethereal; this made the package update work properly when the software was renamed several years ago.)
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.