You are not logged in.

#1 2023-07-05 14:10:01

maziar
Member
Registered: 2022-08-28
Posts: 58

[SOLVED] Extract Package list without pacman

Hi


How to get the list of installed packages without Pacman

For example: have one backup of Arch Linux and try to get the installed package list (pkg cache, not av.)

Thx

Last edited by maziar (2023-07-05 16:09:19)

Offline

#2 2023-07-05 14:14:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,466
Website

Re: [SOLVED] Extract Package list without pacman

Why can't you use pacman??

If you really can't:

find /var/lib/pacman/local/ -type d -exec basename '{}' \;

Or, for a more flexible format which is actually faster than the previous example when using gnu's coreutils (and has the bonus of being sorted):

sed -n '/%NAME%/{n;h;};/%VERSION%/{n;H;x;s/\n/\t/p;}' /var/lib/pacman/local/*/desc

Last edited by Trilby (2023-07-05 14:27:14)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2023-07-05 15:04:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: [SOLVED] Extract Package list without pacman

From the description it sounds like OP is searching for --sysroot, https://man.archlinux.org/man/core/pacm … en#OPTIONS
https://en.wikipedia.org/wiki/XY_problem

Offline

#4 2023-07-05 15:49:31

maziar
Member
Registered: 2022-08-28
Posts: 58

Re: [SOLVED] Extract Package list without pacman

Trilby wrote:

Why can't you use Pacman??

Because I have not lived arch! I only have a backup of it on another machine!

Offline

#5 2023-07-05 15:52:33

maziar
Member
Registered: 2022-08-28
Posts: 58

Re: [SOLVED] Extract Package list without pacman

del

Last edited by maziar (2023-07-05 16:09:41)

Offline

#6 2023-07-05 15:53:11

maziar
Member
Registered: 2022-08-28
Posts: 58

Re: [SOLVED] Extract Package list without pacman

seth wrote:

From the description it sounds like OP is searching for --sysroot, https://man.archlinux.org/man/core/pacm … en#OPTIONS
https://en.wikipedia.org/wiki/XY_problem

roll

Offline

Board footer

Powered by FluxBB