this doesn’t actually do the same thing as the previous comment running autoremove afterwards does; the former will remove things which were rendered removable by the upgrade while the latter will only remove things which were already autoremovable prior the upgrade.
sudo apt --update --autoremove upgrade -y
note
this doesn’t actually do the same thing as the previous comment running autoremove afterwards does; the former will remove things which were rendered removable by the upgrade while the latter will only remove things which were already autoremovable prior the upgrade.