Automated install
I started in the world of Arch first with Manjaro, I transitioned from Ubuntu because the rolling release model sounded interesting and I kept hearing good things about Pacman.
Now I've finally fully transitioned one of my (Thinkpad) laptops to Arch from scratch and I've got one laptop left to install Arch and get rid of Manjaro, which ... in my opinion...creates more problems that it solves.
The instalation of Arch was dead easy on my X240 but once inside the new system the process of installing one by one all the programs I regularly used and gave for granted that would be there, was a little painful. It was ultimately rewarding because I developed in the process an awareness of all the stuff I didn't need.
But now I want to transition my good old e545 to Arch and considering I can see all the packages I have with a simple
Pacman -Q
... I do wonder whats the best way to automatically install them all. Should I just write a script that reads a file with all of those packages and pass them as arguments to pacman/yay?
Or do people use some "custom distro creator" for this taks? I just want to be sure I'm not reinventing the wheel, specially if there's a better way I'm not aware of.
What do you guys think I should do?
About this post
- Posted
- Archived
- Score
- 1 · 100% up
- Kind
- Text
- ID
- atk5vm
17 comments
https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Install_packages_from_a_list
Hmmm, after soaking my brain in the knowledge of that link I've decided Pacmanity does what I need.
Thank you. There's so much stuff in Arch's wiki that is impossible to know what is it that you don't know.
I've been using pacmanity for some months now and I'm very happy with it. I also maintain a local copy by doing a git pull to a home directory.
Side effect: if you use the pamac GUI you may see a message at the end of the process about pacmanity being unable to log into your GitHub account - it's a by product of the way pamac handles permissions. To make life easier I do all my package management from the terminal now (with yay) which is by all accounts preferable!
I use the GUI as a handy database still...
I think you're over complicating things but if it gets the job done.
Interesting, I see in the link
Thank you.
pacman -Qeq > list< list pacman -S --needed -Thanks but there's a problem with this example. It won't get me the ones from the AUR that I need
pacman -Qeqnlists all explicitly installed packages from the repos.pacman -Qeqmlists all explicitly installed foreign packages. Chances are that's all AUR stuff for you.
This is what i do:
x and y are variables that extract with cat command the contents of x.txt and y.txt. Those contents are placed in substitution of $x and $y.
Pacman needs to be executed as root, Yay must NOT be executed as root. I use Yay to install AUR packages, ofc you can use whatever else.
Inside x.txt and y.txt write the packages you want to install without commas. For example "plasma konsole firefox kate".
I personally made a script that installs and configures Arch like i want it, at the end it also installs extra packages from two txt files like above. I use those extra TXTs because it's easier to update them instead of the actual script.
EDIT: No, last two lines are not needed. .-.
There's so much wrong here.
Well, i'm new with Arch (two days ago) and yeah i got it wrong, i forgot that Yay needs to be downloaded from github. I'll edit the script above. The point is that i made a script that installs Yay for me, which is why i forgot (all excuses, i know, LOL).
"-Sy should not be used" Again, i got it wrong... I never executed that command TBH...
"Installing a ton of AUR packages with noconfirm is not something I would recommend" Why not? Ya know how slow Yay is? It takes an ethernity to install 4 apps. It's for a fresh install anyway, it's not like you can mess up something important. The worst scenario i got is a building failure.
"--needed should be used just to save on installing stuff you already have" Didn't know that, cool, but i don't think it's needed in this case, as i'd install packages that i know Arch and Plasma (in my case) don't install.
"Both yay and pacman support reading stdin" Well, that's something i should learn for sure...
but this does the same as pacmanity and in a less practical way because there's no version controlling, nor is it uploaded anywhere for you to enjoy, whenever you install anything.
No, Pacmanity at installation needs GitHub login, which i find it a waste of time. And i have uploaded these two files in GitHub together with my Arch+KDE installation script. No hassle. Just one pacman -Sy git and git clone for all what i need.
https://github.com/CyberShadow/aconfmgr