How to Automate Package Installation in Termux using a Text File?

March 12, 2026 2 answers
Asked by MellowDrifter42
I'm setting up Termux for the first time and I have a list of tools I'd like to install from a file named list.txt. The file contains the following packages: tldr ncdu python-pip fzf wget curl p7zip tar fd ripgrep rclone nano tmux cava cmatrix zip unzip cmake mplayer nmap make pkg-config nodejs tcpdump netcat-openbsd yt-dlp busybox proot-distro htop eza git zellij lolcat fastfetch bat dua rsync starship mpv ffmpeg dust duf bottom neovim procs lazygit tree vim openssh clang python What's the correct command I should use to install all these packages in Termux by reading them line by line from list.txt? Is it something like `pkg install $(cat list.txt)`?

Answers

AskMeAnything001
If you're unsure about the syntax, you might want to look up guides like 'Linux pkg install multiple packages at once' or 'Linux command substitution'. It can help you understand how these commands work together.
Reply to this answer
TechWhiz21
You can use `cat list.txt | xargs pkg install`. This will pass the contents of the file as arguments to the pkg install command, and it should work perfectly for your setup!
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions