To search for package

apt-cache search gcc

See a description of package

apt-cache show gcc

Install a package

sudo apt install gcc

Remove a package

sudo apt remove openmpi-bin

I use Spack to install scientific packages. Before that, install some needed dependencies

sudo apt install gcc g++ gfortran gnuplot make curl wget git vim

Next see the Spack tips for installing other softwares. openmpi will also be installed by Spack, so do not install it from apt.