Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RPM spec missing uninstall section?

Tags:

rpm

rpm-spec

I see no uninstall section in RPM spec documentation. I do see preun and postun.

  1. Is there uninstall phase?
  2. What exactly happens during uninstall phase? Basing on %files section, a list of files is removed? and that's it?
like image 233
Michal Avatar asked Apr 01 '15 12:04

Michal


1 Answers

Correct.

The %install section of an RPM spec file is not run on rpm package installation (the name is misleading in that sense). The %install section is run during package creation to install the files that need to be packaged such that the rpmbuild process can package them up.

As such, as because the %files section lists all the files and directories that the package contains the uninstallation process for an rpm is simply the removal of all the packaged files.

If additional work needs to be done before or after the files are removed the %preun and %postun scriptlets are available in the spec file for that work.

like image 195
Etan Reisner Avatar answered Sep 20 '22 18:09

Etan Reisner