3

I am using Termux in my Android device and it is awesome. I've installed it from Google Play. Now the packages that I install using the command pkg install ..., install those to the internal storage. Since my internal storage space is running low, I am thinking to install these packages to the external SD card. Can I do it? Thank you.

  • @beeshyams What? I'm sure that according to what OP says (the packages that I install using the command 'pkg install...') it's impossible. Also, I read no "install packages to external storage" in the link your provided. – iBug Jul 17 '18 at 15:21
  • @ibug +1. Deleted my comment – beeshyams Jul 17 '18 at 16:32
2

Unfortunately you can't.

The packages you install using pkg install, which is actually a wrapper for the frontend of the famous Debian Package Manager, APT. APT downloads packages provided by Termux and installs them. So the packages are just Debian packages. Witha bit of Googling and/or digging, you'll find that file paths are hardcoded, i.e., they'll always be extracted (installed) into /data/data/com.termux/files/usr.

Possible tricks are, apparently, possible. However it's not recommended to try any as Termux is highly similar to a real Linux environment, which means any bad SELinux context or wrong permission can cause programs to malfunction.

Answer: Try to free up your internal storage if you plan to install more packages in Termux, instead of thinking about installing the packages to elsewhere.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.