FG

Output from rpm -qa, how to extract only the name of the package?

Fresh3 days ago
Mar 15, 202628799 views
Confidence Score0%
0%

Problem

The output format from the command looks like the following: Can anyone tell me how to reliably remove the version, release, and arch part so that I end up with I would rather avoid trying to construct a regular expression for sed, because I expect it to be complicated in order to support names lik…

Error Output

abrt-1.1.14-1.fc14.x86_64
abrt-addon-ccpp-1.1.14-1.fc14.x86_64
abrt-addon-kerneloops-1.1.14-1.fc14.x86_64
abrt-addon-python-1.1.14-1.fc14.x86_64
abrt…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Output from rpm -qa, how to extract only the name of the package?

Low Risk

You can use rpm's queryformat parameter. You give it a format string where you can have tags surrounded by . You can see all the allowed tags with I'm guessing you'd want something like:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment