To install all programs from one Manjaro system on another, you can follow these steps:
Export Package List
On the source Manjaro system:
- Open a terminal
- Run the following command to export a list of explicitly installed packages:
pacman -Qqe > packages.txt
This will create a file called "packages.txt" containing the names of all explicitly installed packages[1].
Transfer the Package List
Transfer the "packages.txt" file to the target Manjaro system. You can use various methods like USB drive, network transfer, or cloud storage.
Install Packages on Target System
On the target Manjaro system:
- Open a terminal
- Navigate to the directory containing the "packages.txt" file
- Run the following command to install all packages from the list:
sudo pacman -S --needed - < packages.txt
This command will install all packages listed in the file, skipping any that are already installed[1].
Additional Considerations
-
AUR Packages: The above method only covers official repository packages. For AUR packages, you'll need to install them manually or use an AUR helper like
yay
[2]. -
Configuration Files: Remember that this process only installs packages, not their configurations. You may need to transfer configuration files separately.
-
System Differences: Be aware that some packages might not be compatible if the two systems have different architectures or Manjaro versions.
-
Updates: After installation, run a system update:
sudo pacman -Syu
- Cleaning Up: You might want to remove unnecessary packages on the target system:
sudo pacman -Rns $(pacman -Qtdq)
This process should help you replicate most of the software environment from one Manjaro system to another. However, always review the package list before installation to ensure it's appropriate for the target system[1][2].
Citations: [1] https://www.reddit.com/r/ManjaroLinux/comments/ifowrz/how_to_install_software_in_manjaro/ [2] https://github.com/manzurahmed/manjaro-software-installation-guide [3] https://www.youtube.com/watch?v=82YinI2Cgbc [4] https://www.youtube.com/watch?v=VTE4vtrvIM4 [5] https://forum.manjaro.org/t/install-software-from-terminal-cd-downloads-in-manjaro/88674 [6] https://forum.manjaro.org/t/how-to-install-software-over-applications-in-manjaro-hello/110060 [7] https://forum.manjaro.org/t/how-to-install-apps-on-manjaro/84114 [8] https://forum.manjaro.org/t/how-to-install-new-software/141060
While yay doesn't have a direct --needed option like pacman, you can still achieve a similar result using a loop. Here's how you can install packages from a list, skipping those that are already installed:
Transfer the "installed_packages.txt" file to the new Manjaro system.
On the new system, use the following bash script to install packages:
This script does the following:
yay -Qi
.yay -S --noconfirm
.Save this script as "install_packages.sh" and make it executable:
Then run the script:
Important considerations:
--noconfirm
option is used to avoid prompts, but be cautious as it will automatically accept all default options.By using this approach, you can replicate the functionality of the
--needed
option while using yay to install packages from both official repositories and the AUR[2].Citations: [1] https://www.hostzealot.com/blog/how-to/installing-yay-aur-helper-on-arch-linux-a-step-by-step-guide [2] https://www.reddit.com/r/archlinux/comments/jtaraj/is_there_a_way_to_automate_pkg_install_with_yay/ [3] https://linuxcommandlibrary.com/man/yay [4] https://stackoverflow.com/questions/53921707/loop-in-order-to-load-or-install-packages-does-not-work-what-am-i-doing-wrong [5] https://forum.manjaro.org/t/force-yay-to-rebuild-aur-package-s/141726 [6] https://es.hostzealot.com/blog/how-to/instalacion-de-yay-aur-helper-en-arch-linux-guia-paso-a-paso [7] https://xerolinux.xyz/posts/install-yay-paru/ [8] https://bbs.archlinux.org/viewtopic.php?id=281104