apt-get remove packagename
will remove the binaries, but not the configuration or data files of the package
packagename. It will also leave dependencies installed with it on installation time untouched.
apt-get purge packagename, or
apt-get remove --purge packagename
will remove about everything regarding the package
packagename, but not the dependencies installed with it on installation. Both commands are equivalent.
Particularly useful when you want to 'start all over' with an application because you messed up the configuration. However, it does not remove configuration or data files residing in your home directory, usually in hidden folders there. There is no easy way to get those removed as well.
removes orphaned packages, i.e. installed packages that used to be installed as an dependency, but aren't any longer. Use this after removing a package which had installed dependencies you're no longer interested in.
aptitude remove packagename, or
aptitude purge packagename (likewise)
will also attempt to remove then not used dependencies anymore in one step.
And many more exist. Lower-level
dpkg-commands can be used (advanced), or GUI tools like Muon, Synaptic, Software Center, etc. There's no single 'correct way' of removing applications or performing other tasks interacting with your package management.
The list you found are just examples. Make sure you understand the meanings and try out what it wants to do before accepting the action (you need to press
Y before it actually performs the actions as proposed).
The asterisk character appended just lets it expands to more packages starting with
packagename. So if there's a
packagename they will match all three.
sudo updatedb # <-- updates the locate database (index). harmless
sudo locate application # <-- locates the file 'application'. harmless
sudo rm -rf (file/folder name) # <-- removes files/dirs recursively. dangerous.
are completely outside the scope of the package management. Do not remove files belonging to packages without using the package management! It will get confused and is the wrong way to do things.
If you don't know to which package a file belongs, try this:
dpkg -S /path/to/file