You are not logged in.

#1 2016-03-16 03:59:30

harvie
Member
From: Prague
Registered: 2015-01-20
Posts: 14
Website

How to list installed packages with specific arch?

Hello,
i want to migrate from i686 to x86_64, so i listed foreign packages like

pacman -Qqm

and it shows lots of packages. But like half of them are architecture independent. (Shell scipts, TTF fonts, Java apps, etc...) They all had arch=any in PKGBUILD.
Is there way to get list of these packages so i don't have to reinstall all of them?

Also i'd like to do something like pacman -Qqm --arch=i686 to get list of foreign packages that are i686 specific (so it does not contain arch=any packages).

Offline

#2 2016-03-16 04:04:01

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: How to list installed packages with specific arch?

There may be a better interface, but I would just grep through /var/lib/pacman/local/

Offline

#3 2016-03-16 04:12:59

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: How to list installed packages with specific arch?

pacsift (from aur/pacutils) can do this.

pacsift --local --arch=i686 | cut -d '/' -f 2

Last edited by eschwartz (2016-03-16 04:14:52)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2016-03-16 04:22:26

harvie
Member
From: Prague
Registered: 2015-01-20
Posts: 14
Website

Re: How to list installed packages with specific arch?

Scimmia wrote:

There may be a better interface, but I would just grep through /var/lib/pacman/local/

Well this somehow works, however i can't grep which packages are available from repos and which are not. So i'd rather had some way to get pacman to do the task.

grep -Pzor '%ARCH%\nany' /var/lib/pacman/local | grep pacman | cut -d / -f 6 | cut -d - -f -2

Last edited by harvie (2016-03-16 04:31:20)

Offline

#5 2016-03-16 04:26:57

harvie
Member
From: Prague
Registered: 2015-01-20
Posts: 14
Website

Re: How to list installed packages with specific arch?

Eschwartz wrote:

pacsift (from aur/pacutils) can do this.

It's kinda neat, but still can't match foreign packages as pacman -Qm or native as pacman -Qn

Offline

#6 2016-03-16 04:36:10

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: How to list installed packages with specific arch?

So pipe the results of that to pacman -Qn ...


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB