update

apt-get update
apt-get dist-upgrade
apt-get autoremove

or

apt update
apt fullapt-upgrade
apt auto

install & remove

apt install <package-name>
apt install <path-to-deb-file> # with ./ if at $PWD
apt remove <package>
apt purge <package>

query package info

dpkg -l [<package>] # list installed packages
dpkg -L <package> # list installed files
apt-cache show <package> # print package info
apt-cache {depends|rdepends} <package>
apt search <pattern> # search packages that match, installed or not