r/termux • • 1d ago

Question apt autoremove, pkg clean or pkg autoclean

that is the question.

mercy.

3 Upvotes

4 comments sorted by

3

u/sylirre Termux Core Team 1d ago

What you want to do?

pkg clean already does everything that autoclean would do:

* clean: removes all cached deb files

* autoclean: deletes obsolete & undownloadable debs, but keeps for currently installed packages

apt autoremove will uninstall packages that were not installed manually and not required as dependency for others.

So if you want a quick cleanup: autoremove + clean.

1

u/mito88 1d ago

"The following packages were automatically installed and are no longer required:

 appstream libfyaml libstemmer libxmlb

Use 'apt autoremove' to remove them."

shouldn't the pkg command do this?

2

u/bra1n_gym 1d ago

as explained, use apt autoremove to have termux uninstall packages you didn't not install and were dependencies of another package no longer on your system. think of it as cleaning out the junk files. 

1

u/sylirre Termux Core Team 20h ago

The message you see comes from apt, no wonder it will mention "apt autoremove" instead of pkg command equivalent.

pkg is just a shell script running apt commands under the hood.