Yes but sometimes remove fails, leaving behind partially installed packages. Which is why one needs to read the apt-get output.
apt-get remove --purge foopackage