The short way to know installed package architecture?

I found many cmds provide info about the OS architecture x64 or x86 like in the poll below.

  • getconf LONG_BIT gives 64
  • arch gives x86_64
  • uname -m gives x86_64
  • dpkg --print-architecture gives amd64

0 voters

My aim was to get package architecture with short output like in the output of the poll commands and I arrived to the following:

  1. dnf info code
  2. dpkg -s python

Does :fedora: provide such command to get short output like that ?

What about rpm?

For instance:
rpm -qa | grep packagename
or
rpm -qi packagename | grep Architecture

1 Like

I’ve closed the poll. It doesnt serve much purpose. We can collect the different ways, and users can pick ones that work for them. :slight_smile:

2 Likes

I found them short like the following:

  1. [tarik@localhost ~]$ rpm -qa | grep weechat
    weechat-2.4-1.fc29.x86_64
  2. [tarik@localhost ~]$ rpm -qi weechat | grep Architecture
    Architecture: x86_64

Thank you @alciregi

No problem from my side, it was related to main tag architecture and also opportunity to use Discourse poll feature.

Sure, but polls dont fit everywhere :slight_smile:

About dpkg -s python I avoid it for now after I found Fedora doc suggests to use DNF.

Use DNF Instead of RPM Whenever Possible

➜  ~ sudo dnf info tilix | grep Architecture
[sudo] password for tarik: 
Failed to synchronize cache for repo 'unitedrpms'
Ignoring repositories: unitedrpms
Architecture : x86_64