pkg clean or portsclean remove any installed software. The pkg-clean(8) only removes locally cached (i.e. downloaded) packages. It doesn't touch anything that's installed.And backups do not delete by means of those commands? I understood that any dependence on older versions of unused or uninstall packages (software), the system cleaned it with those commands.How would the system be able to tell if the software is unnecessary? It can't. That's up to you. And so, it's also up to you to remove anything that's not needed.
Note that neitherpkg cleanorportscleanremove any installed software. The pkg-clean(8) only removes locally cached (i.e. downloaded) packages. It doesn't touch anything that's installed.
pkg-clean(8) only removes files from /var/cache/pkg/. These are locally cached files from previous invocations of pkg-install(8) or pkg-upgrade(8).And backups do not delete by means of those commands?
pkg prime-list to get the origins. If there is something you don't use/need run pkg set -A1 pkgname, and then pkg autoremove to remove what is not a dependency of something.