Cydia is the Package Manager available since the beginning of jailbreak. Most of the users are adding new sources, installing, and removing packages from the GUI. Did you know that you can execute commands also from terminal to fix some issues when Cydia app is not working?
It's always easier and faster to install packages from Cydia app, but you can also run some command line tools to add new sources, install, remove, or check the list of installed packages, and more. This knowledge will be very useful when you install a tweak that will crash Cydia.
Cydia uses Advanced Package Tool (APT) software to handle the installation and removal of apps, tweaks, libraries on iOS devices. APT is also used as a backend for Sileo and Zebra package managers. Install your favorite terminal iOS app to access and execute Cydia commands.
Cydia terminal commands
Display list of all installed packages on iOS.
apt list --installed Listing... Done. bzip2/now 22.214.171.124-2 iphoneos-arm [installed, local] com.bingner.plutis/now 0.1.0 iphoneos-arm [installed, local]
Install package from available source list.
apt-get install com.cootek.touchpalinputmethod
Remove selected package by name from the system.
apt-get remove com.cootek.touchpalinputmethod
Reinstall package and its installed dependencies
apt-get --reinstall install <package>
Update all available Cydia repositories.
Erase downloaded archive files and free space on your device.
Perform an upgrade of installed packages.
Add, remove, or edit the list of Cydia Sources using free nano command line text editor.
Activate su (short for substitute user).
su password: alpine
All installed packages via Cydia will be available from /var/lib/dpkg/info directory.