Package Manager in Termux : Installing and Uninstalling packages

Hello Geeks

Upon installing Termux we have to install various package for our work. Many times we face problems in installing package.

Here is complete details about package installation and it's other options.

Installing new package:

Firstly it is recommended to use pkg instead of apt 

pkg install package name

It is highly recommended to upgrade existing packages before installing the new one. You can install updates by running this command:

pkg upgrade

Additionally, it is suggesting to check for updates at least once a week. Otherwise there is a certain risk that during package installation or upgrade you will encounter issues.

Removing the installed package:

pkg uninstall package-name

This will remove package but modified configuration files will be left intact. If you want to remove them, use apt purge instead.


Other options are tabulated here, check now :

Command Description
pkg autoclean Remove outdated .deb files from the cache.
pkg clean Remove all .deb files from the cache.
pkg files <package> List files installed by specified package.
pkg list-all List all available packages.
pkg list-installed List currently installed packages.
pkg reinstall <package> Re-install specified package.
pkg search <query> Search package by query.
pkg show <package> Show information about specific package.

Hope you find it useful so please share it and if you face any problem please comment I am happy to help you.

Post a Comment

0 Comments