Best practice:
use apt-get
or aptitude
or Ubuntu Software Center.
Is there a difference?
Yes
The actual installation/uninstallation is always done by dpkg. Apt and other utilities ask dpkg to do its job.
dpkg can not handle dependencies automatically. You either figure out dependencies, fetch all those packages and give them to dpkg all at once, or deal with the unmet dependencies mess. Apt handles this, and that is what I believe its primary use. Apt also brings in some fancy stuff. Look at its conf files for the full details.
Barring the dependency handling, the remove commands are equivalent. The only difference is apt refuses to remove a package that others depend on, without removing them, and it can be set up to remove automatically the packages that no one else needs as a dependency.
apt-get
anddpkg
doesn't really address this specific issue.apt-get remove
andapt-get purge
.