I see no uninstall section in RPM spec documentation. I do see preun and postun.
- Is there uninstall phase?
- What exactly happens during uninstall phase? Basing on %files section, a list of files is removed? and that's it?
I see no uninstall section in RPM spec documentation. I do see preun and postun.
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.
© 2022 - 2024 — McMap. All rights reserved.
%files
information), is added to the systemrpm database
(generally in/var/lib/rpm
). On uninstall, this database information is read byrpm
to guide the removal process. – Keene