autoremove
also: apt autoremove, apt-get autoremove
A package manager operation that automatically removes packages that were installed as dependencies but are no longer needed by any installed package.
autoremove is a feature in Debian/Ubuntu-based package managers (apt, apt-get) that cleans up orphaned dependencies. When you uninstall a package, its dependencies are often left behind; autoremove safely identifies and removes these unused dependencies to free up disk space.
For example, if you install a program that requires five library packages as dependencies, then later uninstall that program, autoremove will detect that those libraries are no longer required by any other installed package and offer to remove them.
Common usage: sudo apt autoremove or sudo apt-get autoremove. The command is safe because the package manager ensures it only removes packages marked as automatically installed and no longer needed by any manually installed package.