Termux is a powerful Linux Terminal Emulator for Android. It allows you to run Linux Packages or Applications on Android. In this article you will learn how to manage termux package like pro.
If you are regular termux user then you know package management is important things in termux.
Termux has APT PACKAGE MANAGER support. In addition it provides a wrapper script PKG that has hidden shortcut command that most users don’t know. Let’s see what are they.
Remove all outdated packages from .deb package cache.
$ pkg autoclean Or $ pkg autoc
Remove all packages from .deb package cache.
$ pkg clean Or $ pkg cl
update list of available packages.
$ pkg update Or $ pkg upd
Upgrade all installed packages to the latest version.
$ pkg upgrade Or $ pkg upg
Search package by query, for example by name or description part.
$ pkg search <query> Or $ pkg se <query>
Install specified packages.
$ pkg install <packages> Or $ pkg i <packages>
Reinstall specified installed packages at the latest version.
$ pkg reinstall <packages> Or $ pkg rei <packages>
Show basic metadata, such as dependencies.
$ pkg show <packages> Or $ pkg sh <packages>
Show all files installed by packages.
$ pkg files <packages> Or $ pkg fi <packages>
List all packages available in repositories.
$ pkg list-all Or $ pkg list-a
List installed packages.
$ pkg list-installed Or $ pkg list-i
When we upgrade termux packages you use && symbol to combine upade and upgrade. And most users don’t know that they can also use ; for that.
~ $ pkg update && pkg upgrade But we can also use ~ $ pkg upd; pkg upg
We have seen how to use pkg command now lets install some packages.
Before installing any package we most update the repository. This is Recommand.
~ $ pkg upd; pkg upg
Lets install some usefull tools like nano the text editor, python the most popular programming language, git for downloading most popular tools created by large community of programmers and hackers, busybox the multi-call binary.
~ $ pkg i nano python git busybox