Remove or Purge package in Ubuntu

Ubuntu offers two options to remove packages. When you remove packages, you only remove the packages, but not their configuration files. Enter the following command to remove a package in a terminal window.
$ sudo apt-get remove packagename <enter>

When you purge packages, you remove the packages and their configuration files. Enter the command below to purge a package in a terminal window.
$ sudo apt-get purge packagename <enter>

After a purge, you should normally do
$ sudo apt-get autoremove <enter>