Basic examples of package management on Debian based systems.
# Search a package
$ apt search openssh
# Install package in different wasy
$ apt install openssh
# Manually install a .deb file
$ dpkg -i openssh.deb
# Fix broken installed package
$ apt -f install
# Remove packages
$ apt remove openssh
# Purge packages - purging removes also all configuration files, remove does not
$ apt purge openssh
# Clear cache of old packages
$ apt clean
# Clean system from old & unneeded packages
$ apt autoremove
# Upgrade all installed packages with newer versions
$ apt upgrade
# Upgrade all packages and also handle dependencies of packages (removes packages if needed)
$ apt dist-upgrade