You are not logged in.

#1 2025-12-25 13:14:42

mrkc95
Member
Registered: 2025-11-25
Posts: 12

[SOLVED] Is there any easyway to backup packages before re-install OS?

I need some locale-related packages and drivers (fonts, input method, wi-fi adapter dkms driver, etc.) to use after installation.

It is a little bit bothering that I have to check these packages and configurations after re-install OS.

So I want to build some kind of automated post-process.

Would you please suggest any ideas?

Last edited by mrkc95 (2025-12-26 06:47:13)

Offline

#2 2025-12-25 16:35:43

just4arch
Member
Registered: 2023-01-07
Posts: 118

Re: [SOLVED] Is there any easyway to backup packages before re-install OS?

Offline

#3 2025-12-25 17:31:57

cryptearth
Member
Registered: 2024-02-03
Posts: 1,884

Re: [SOLVED] Is there any easyway to backup packages before re-install OS?

pacman -Qe

Offline

#4 2025-12-25 17:43:03

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,418

Re: [SOLVED] Is there any easyway to backup packages before re-install OS?

cryptearth wrote:
pacman -Qe

That command isn't all that useful for the stated purposes.

Offline

#5 2025-12-25 18:07:05

ChrisWinters
Member
Registered: 2024-11-20
Posts: 9

Re: [SOLVED] Is there any easyway to backup packages before re-install OS?

Scimmia wrote:
cryptearth wrote:
pacman -Qe

That command isn't all that useful for the stated purposes.

It's more useful than you seem to know. Though -Qqe is a more useful set of flags. This will print a list of ALL explicitly installed packages on your system. Then you just copy and paste that list as is into a new file and give it a name (pkslst.lst for example) and when you want to reinstall Arch Linux, simply run

sudo pacman -S --needed - < pkglst.lst

This will use the contents of that file as the input for pacman, thus installing every package in the list and their dependencies.

Offline

#6 2025-12-25 18:11:18

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,418

Re: [SOLVED] Is there any easyway to backup packages before re-install OS?

Which will fail the vast majority of the time, as most people will have some foreign package. The link to the wiki explains things instead of giving a single, nearly useless command, especially since it doesn't have quiet.

Last edited by Scimmia (2025-12-25 18:12:16)

Offline

#7 2025-12-26 06:45:41

mrkc95
Member
Registered: 2025-11-25
Posts: 12

Re: [SOLVED] Is there any easyway to backup packages before re-install OS?

ChrisWinters wrote:
Scimmia wrote:
cryptearth wrote:
pacman -Qe

That command isn't all that useful for the stated purposes.

It's more useful than you seem to know. Though -Qqe is a more useful set of flags. This will print a list of ALL explicitly installed packages on your system. Then you just copy and paste that list as is into a new file and give it a name (pkslst.lst for example) and when you want to reinstall Arch Linux, simply run

sudo pacman -S --needed - < pkglst.lst

This will use the contents of that file as the input for pacman, thus installing every package in the list and their dependencies.

Thanks! I'll try this at home.

Offline

#8 2025-12-26 11:28:14

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,418

Re: [SOLVED] Is there any easyway to backup packages before re-install OS?

And when that fails, go read the wiki.

Offline

Board footer

Powered by FluxBB