Forrest logo
back to the rpm tool

rpm:tldr:805d7

rpm: Show scriptlets from an RPM file.
$ rpm --query --package --scripts ${package_name-rpm}
try on your machine

The rpm --query --package --scripts ${package_name-rpm} command is used to fetch and display information about a specific RPM package, including its name, version, release, and the scripts associated with it.

Here's how the command works:

  • rpm: This is the command-line tool for RPM Package Manager, used for package installation, querying, verification, and more in RPM-based Linux distributions.

  • --query: This option tells the rpm command to perform a query operation, which means it will fetch and display information about the specified package.

  • --package: This option specifies that the package-related information should be displayed.

  • --scripts: This option instructs rpm to include the package scripts in the output. Package scripts are scripts that are executed at specific stages during package installation or removal, such as pre-installation, post-installation, pre-removal, and post-removal scripts.

  • ${package_name-rpm}: This is a variable representing the name of the RPM package. The value of the variable should be provided when running the command, and it should be the actual name of the package you want to query.

By running this command with the appropriate package name, you will get information about the package itself and any associated package scripts.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the rpm tool