Backup of pacman packages

i want to keep a list of the packages i have installed on my machine in a txt file, but i want to exclude those from endeavouros’ repos and those installed from the aur. how can i do that?

pacman -Qqm

1 Like

hi @systemdeeznuts

maybe pacman -Qn

Edit: its wrong

Unfortunately, I don’t know the exact command to display the packages you have installed. but this is an example of how to create a text file with the output. all you have to do is filter out the aur and endeavoros repos. maybe the following link will be helpful.

https://wiki.archlinux.org/title/Pacman/Tips_and_tricks

with the character ‘>’ you create a text file, if a text file with the same name already exists, it will be overwritten. if you don’t want it to be overwritten then use ‘>>’ then it will be appended.

pacman -Qe > /home/your_username/Documents/my_packages.txt

pacman -Qqem > ~/packages-AUR.txt && pacman -Qqetn > ~/packages-repository.txt

5 Likes

pacman -Qqn > ~/packages-repository.txt is the closest to the thing i want, but it only filters out aur packages. i was wondering if i could also somehow skip those from eos (like eos-packagelist, eos-rankmirrors, welcome etc…)

what are the t and n options for?

see pacman -Q --help.

If it is one-time, just comment out the EOS repo and pacman -Qqn.

If you want to do it on a repeatable basis use comm and pacman -Sl endeavouros

(Sorry, wrong command. ;))

But this might work:

LANG=C pacman -Sl $(pacman-conf -l | \grep -v endeavouros) | grep "\[installed\]" | awk '{print $2}' | sort > arch-packages.txt

Install pacman-contrib and then run paclist core community extra ...

3 Likes