Ask Your Question

is there a command to list applications packages only ?

asked 2016-04-20 14:42:16 -0600

ahmed.alamassi gravatar image

is there an rpm,dnf,yum command lists packages that contain applications ONLY ? rpm -qa lists all installed packages,libraries,kernel,system stuff etc. I only want it to list applications packages for example : deluge , youtube-dl , cmus , firefox etc.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-04-20 16:31:41 -0600

Rabin gravatar image

Same answer different command

dnf provides "*.desktop" | grep -Ev "^Repo|^\s+|^\s*$"
edit flag offensive delete link more

answered 2016-04-20 15:43:05 -0600

vtrefny gravatar image

Short answer: No, there isn't. RPM or DNF doesn't know if a package is an application, it's just an archive with some files.

Long answer: It's possible to list files in a package, so you could check if there is a certain file that may indicate the package contains an application -- e.g. if there is a .desktop file or an AppData file or if it installs some executables. But it will be very very slow and there will be false positives (for example plugins) and some applications will be missing (not all have desktop files or appdata).

This "command" will list all packages that have an appdata file (and it will take just two weeks to finish):

for pkg in `rpm -qa` ;do [ `dnf repoquery --list $pkg | sed -n "/.appdata.xml/p" | wc -l` -ne 0 ] && echo $pkg ;done
edit flag offensive delete link more

Question Tools



Asked: 2016-04-20 14:42:16 -0600

Seen: 103 times

Last updated: Apr 20 '16