[SOLVED] How to Make a .txt file of All the Programs I Wish to Install

Fernandomaroto wrote on my post “How do I get the Bluetooth to Work on my ZaReason Ultralap?”

Don’t know from pdf, but if you create a .txt list of all packages you want to install you can quickly install them through pacman. (create a new post about it if you want, we’ll help you)

Here I am and how do I do this? Will it alphabetize the programs as I would like and could I install through < yay -S [program name{s} >? Quite a few of the programs I use are available only from the AUR.

Thank you!

Lawrence

1 Like

Ok

first of all, this is good article for anyone interested in generating package list

https://linuxhint.com/list_installed_packages_pacman_arch_linux/

In this example i’m using -Qqe option, but you can manually edit this list or make your own with only desired packages

Generating package list

pacman -Qqe >installed_packages.txt

Edit the list as you want using your prefered text editor

For AUR packages.

OBS: this actually list any package external from official, so endeavouros packages are also listed here.

pacman -Qqm >aur_packages.txt

#installing

There are multiples ways to accomplish this, i’ll give a couple examples

if you have one package by line you can:
1)
sudo pacman -S $(cat installed_packages.txt |xargs) --needed --noconfirm

Or even
2)
for x in $(cat installed_packages.txt); do sudo pacman -S $x --needed --noconfirm; done

3 )For AUR
yay -S $(cat aur_packages.txt |xargs) --needed --noconfirm

  • -needed will only install new packages, so you won’t waste time reinstalling the already installed
  • -noconfirm won’t prompt the confirmation step “Do you want to install?”. Recommended specially for the second method and with huge list of files
4 Likes

Once I have the basic install done, I install most (as many as I can) of my applications using flatpak.

@fernandomaroto you’ve inspired me to try this with flatpaks. I don’t know if flatpak has equivalent options to -needed and -noconfirm. After a fresh install -needed wouldn’t be critical but not having -noconfirm would be a bother.

Thank you. I seem to be thanking you a lot lately. :smile:

Pudge

1 Like

Thank you. This is perfect. I just did it on my main computer which is currently running Antergos. Would I be able to use the generated .txt file of the programs I have installed on Antergos to install the programs to an EndeavourOS computer or should I manually install everything I want onto one of those EndeavourOS computers and generate the .txt file from that?

Lawrence

1 Like

I’ve never used flatpak, should i give it a try?

That would depends on how you installed the system.
For example if in your fresh install the packages are not stored at pacman cache (like installing the arch way using -c option in pacstrap, or even installing endeavouros offline) not using “–needed” would redownload the entire set of packages just to reinstall them.

I’m glad that i can help.

Yes, as long they are not from antergos repo, in this case pacman wouldn’t find the package and will stop with error.

This can be used as “portability” if that’s what you mean. You can copy the list to any computer and just install using the pacman command.

In case you get error like “package not found” just remove it from the list and try again.

By the way, i didn’t mentioned AUR packages, the method i posted is only for official repos. I’ll add AUR when i have more time.

2 Likes

In order to keep this thread from going off-topic, I am going to reply to this in a new thread. I have things I have to get done at the moment, but I will have it done later today.

Pudge

1 Like

Thank you. I have manually installed every program I use to the first computer on which I have installed EndeavourOS.

I will have to wait to use an AUR command you recommend to ‘copy’ the list to the second computer as many of my desired programs are in fact from the AUR.

Assuming that you do not have the time to add AUR to the ‘copy’ command, I’ll have to complete my second computer manually.

But I’m certainly not rushing you. Take your time. I appreciate all of the information you have given to me. It is necessary for me to have the second computer loaded with all my desired programs quickly. The other ones can wait for a while.

I don’t want to try the pacman command as it would probably stop with error(s).

Thank you so much for all of the replies and good information that you have given to me.

Sincerely,

Lawrence

1 Like

I just added the aur steps in the first post.
Don’t be afraid using the pacman command, any error will just stop the process and won’t destroy anything.

Keep in mind installing aur stuff will take longer and require more intervation from your part.

Thank you. I do want to know a couple of things: First: since the pacman installation will stop the process if errors (presumably AUR programs) are found, should I perform the AUR installation first? (I do not mind intervening when necessary; after all, intervention must be done when installing AUR programs manually.)

And second: If the process is stopped due to some error, what would I do then? Is there some command which would install EVERYTHING with just one command?

Thanks for all of your help.

Lawrence

pacman will stop if can’t find the package in the oficial repo. In this case it will show in the error which package(s) wasn’t found, then you open your package list with your prefered text editor and remove this package. Then run the same command.

In my opinion first install pacman packages, and then aur packages (you need 2 lists of files like the first instruction, 1 for using pacman and other for yay)

It’s possible, but in my opinion this is messy you shouldn’t do this.
You really need to understand that official is safe, and AUR should be avoided the most you can, so always try replacements for AUR stuff in the official repos.

1 Like

You’re right - but what can I do if the desired (and important to me) program is NOT in any of the official repositories (one program that comes immediately to mind is MakeMKV)?

I HAVE to use the AUR in such cases.

Would you please tell me the command that will install everything from that .txt file and in what way(s) it is ‘messy?’ And, if I have to copy over to another computer from the .txt file and I do pacman first, will there be a problem of stopping the installation if there are programs from the AUR contained in that list?

Thank you again.

Lawrence

of course!

Then merge both files into one and install with yay instead of pacman. I haven’t tested but should work.

of course, pacman can’t find aur packages, it will fail.

Is messy for me the fact that people are trying to use yay in everything instead of pacman. Or thinking that is too complicated having 2 lists, properly separating official and unofficial stuff. Simplify is good, i like simple things, but i think there is a limit for this.

This is jus my opinion after all, i don’t expect people to think the same way i do :stuck_out_tongue:

Thank you for all of the information. I’m still confused however - the command to create the list in the first place creates one list only. So I’m not quite certain as to what to do about ‘merging both files’ since I only have one file.

I use more than one program from the AUR and they are important to me; I do try to always use programs from the official repositories but, as you know, sometimes that’s just not possible.

I think that, at this point, I’ll add my programs the way I have always done it - manually, copying the programs’ names from my piece of paper.

Lawrence

You actually have 3 choices. The Arch repositories, the AUR, and flatpak.
makeMKV is available in a flatpak

Not trying to push anything on anyone, just giving available options.

1 Like

Can’t say more than this, it’s pretty much covered above. I guess you need to try some of this things by yourself, otherwise you won’t learn this.
I recommend try in a VM first and see how it goes.

Good luck!

2 Likes

Well, I tried it < yay -S $(cat installed_packages.txt |xargs) --needed --noconfirm > with an < installed_packages.txt > file (into which I had merged the AUR .txt file) on one of my ‘test computers’ - and it didn’t work.

It had downloaded quite a few programs but then the whole thing failed.

But I had noticed that, previous to trying the command, I had tried to update the computer via < yay -Syu > and that had failed. I tried it again after rebooting, but got the same results.

So after the ‘copying’ the .txt file failed too,I figured that there might be something wrong with the installation on my ‘test’ computer.

So I decided to try it on one of my ‘main’ computers. I figured, what could possibly happen? If something did go wrong I could easily reinstall EndeavourOS and configure and adjust this computer the ‘old-fashioned’ manual way (from my piece of paper).

BUT - to make a long story short - the thing worked PERFECTLY!!! EVERY program that I had installed onto my first ‘main’ computer with EndeavourOS installed was transferred to the second computer.

Even all of the Bluetooth programs I needed were transferred. I just had to enable Bluetooth and it worked like a champ!

Installing the programs was very fast, far faster than my doing everything manually, and I can’t express my thanks to you too strongly.

This forum and the members on it are TERRIFIC! I really appreciate all the help you and everyone else have given to me.

I now have four (4) other ‘main’ computers (I had missed one when I originally told you how many I have with Antergos installed) onto which I’ll be installing EndeavourOS and copying all of my programs via your command.

THANK YOU THANK YOU THANK YOU

Lawrence

4 Likes

Thank you very much, this is the purpose of this community; to help each other.
:+1:

4 Likes

I have been using GNU/Linux operating systems since 2008 and in all that time, whenever I installed (or had to reinstall) the system, I would have to add the programs that I use (and there are a considerable number of them) manually, one (or a few) at a time. During the past four or five years I always added them via the Terminal but I never added more than a few at one time, just in case I might overload something.

And now, without my even asking directly for it (all I asked for was the way to make a file containing my programs in alphabetical order), you have shown me the way to obtain such a file PLUS the way to add programs to another computer all in one fell swoop - and the method works perfectly!

I don’t know why it failed on my ‘test’ computer; one of these days I may ‘wipe’ that computer, reinstall EndeavourOS, and try again. But that’s not on my immediate ‘to-do’ list.

I’ll be installing EndeavourOS to my other ‘in-actual-use’ computers over the next few weeks.

I have joined many forums over the years but this one is definitely the best one to which I have ever belonged. When I have asked questions, I have gotten replies within 15 minutes! That only rarely happened previously on other forums.

And, so far at least, EndeavourOS is the best distribution I have ever used (I like it even more than Antergos!). After some reflection, I am very glad that you and the other developers have decided to keep the actual OS ‘clean’ (minimal) so that you do not have to spend an inordinate amount of time on maintenance (which was the problem that brought down Antergos).

I hope that EndeavourOS becomes very, very popular and very, very successful.

Lawrence

7 Likes