au
-rwxrwx--- au
-r--r--r-- au
You can use au dpkg --purge pkg_name and then dpkg --install pkg_name from /sdcard/debs to downgrade packages to a previous version of a package in the hope of regaining system stability in Termux.
You should use au from your $PATH. To see your $PATH, type $PATH +enter/return. Then use mv au destination_directory to move au to your $PATH. au +enter/return will update and backup your Termux in three keystrokes!
Every time you want to apt update && apt upgrade or pkg up, you shall also be backing up your former installation debs to /sdcard/debs by using au. Ideally, you should change /sdcard/debs to an external mirco SD card destination in lines 9 and 11 of au to save space on device.
If you find your system unstable, you can use dpkg --purge pkg_name and then dpkg --install pkg_name from /sdcard/debs to downgrade packages to a previous version of a package in the hope of regaining package stability.
Important: Please use apt -o APT::Keep-Downloaded-Packages="true" install package_name(s) to populate your backup directory in conjunction with au to ensure that you can enjoy a full backup of *.deb files on device.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
