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.

How to manage termux package like pro?

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.

Termux pkg commands :

1. pkg autoclean

Remove all outdated packages from .deb package cache.

$ pkg autoclean
Or 
$ pkg autoc

2. pkg clean

Remove all packages from .deb package cache.

$ pkg clean
Or 
$ pkg cl 

3. pkg update

update list of available packages.

$ pkg update 
Or 
$ pkg upd

4. pkg upgrade

Upgrade all installed packages to the latest version.

$ pkg upgrade
Or 
$ pkg upg

5. pkg search

Search package by query, for example by name or description part.

$ pkg search <query>
Or 
$ pkg se <query>

6. pkg install

Install specified packages.

$ pkg install <packages>
Or 
$ pkg i <packages>

7. pkg reinstall

Reinstall specified installed packages at the latest version.

$ pkg reinstall <packages>
Or 
$ pkg rei <packages>

8. pkg show

Show basic metadata, such as dependencies.

$ pkg show <packages>
Or 
$ pkg sh <packages>

9. pkg files

Show all files installed by packages.

$ pkg files <packages>
Or 
$ pkg fi <packages>

10. pkg list-all

List all packages available in repositories.

$ pkg list-all
Or 
$ pkg list-a 

11. pkg list-installed

List installed packages.

$ pkg list-installed
Or 
$ pkg list-i

How to manage termux package like pro?

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

Install some package

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

Install multiple Packages at once

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