sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove
To keep your Windows Subsystem for Linux (WSL) environment update-to-date run the following command.
The above runs three commands
apt-get dist-upgrade and
This updates the list of packages and versions for apt-get
This is what actually does the upgrade, there is also
apt-get upgrade but the
apt-get dist-upgrade also manages any dependencies.
Hat tip to Jesse Jackson
This command cleans up and packages that are no longer required.