Depends on the name of the package and how you installed it.
From your question, I am guessing you used dpkg
The options for dpkg (and apt-get) are to remove or purge.
remove saves system configuration files, purge does not
-r, --remove package...|-a|--pending
Remove an installed package. This removes everything except
conffiles, which may avoid having to reconfigure the package if
it is reinstalled later (conffiles are configuration files that
are listed in the DEBIAN/conffiles control file). If -a or
--pending is given instead of a package name, then all packages
unpacked, but marked to be removed in file /var/lib/dpkg/status,
are removed.
Removing of a package consists of the following steps:
1. Run prerm script
2. Remove the installed files
3. Run postrm script
-P, --purge package...|-a|--pending
Purge an installed or already removed package. This removes
everything, including conffiles. If -a or --pending is given
instead of a package name, then all packages unpacked or
removed, but marked to be purged in file /var/lib/dpkg/status,
are purged.
Note: some configuration files might be unknown to dpkg because
they are created and handled separately through the
configuration scripts. In that case, dpkg won't remove them by
itself, but the package's postrm script (which is called by
dpkg), has to take care of their removal during purge. Of
course, this only applies to files in system directories, not
configuration files written to individual users' home
directories.
Purging of a package consists of the following steps:
1. Remove the package, if not already removed. See --remove for
detailed information about how this is done.
2. Run postrm script.
See http://manpages.ubuntu.com/manpages/vivid/man1/dpkg.1.html
Neither option removes files from your HOME directory, such as .desktop files. For those you have to manually find and remove them.
Files with spaces in them need quotes or escape the spaces or use tab completion
rm "file with spaces"
rm file\ with\ spaces
rm file<tab><tab>
sudo rm /usr/share/applications/"Eclipse Mars Java"
. There is no need to-f
, and the first command is irrelevant. – mikewhatever Sep 25 '15 at 15:56