How do I find the package name for an application that I want to uninstall?

I tried

sudo apt-get --purge remove snipe2d

But I guess 'snipe2d' isn't the name of the game....so how do I find out what it is and how to put it into my terminal?

P.S. this is what it says when I put in the above code:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package snipe2d

EDIT: The official name of the game in question is: orbital eunuchs sniper


  1. Open the Software Center page for the application.
  2. Scroll down to "Version".

    enter image description here

  3. The package name is the part before the first space in the version.
    In your case, it is orbital-eunuchs-sniper.

  4. You can then do whatever you want with it, e.g.:

    sudo apt-get remove orbital-eunuchs-sniper
    

Alternatively, if you know the path to a file which executes the application, you can also do

dpkg -S /path/to/file

This will print all packages which contain that file.

Example:

$ dpkg -S apt-get
bash-completion: /usr/share/bash-completion/completions/slapt-get
apt: /usr/bin/apt-get
apt: /usr/share/man/es/man8/apt-get.8.gz
bash-completion: /usr/share/bash-completion/completions/apt-get
apt: /usr/share/man/de/man8/apt-get.8.gz
apt: /usr/share/man/pt/man8/apt-get.8.gz
apt: /usr/share/man/pl/man8/apt-get.8.gz
apt: /usr/share/man/fr/man8/apt-get.8.gz
apt: /usr/share/man/man8/apt-get.8.gz
apt: /usr/share/man/ja/man8/apt-get.8.gz

I think you should have more luck using apt-cache search

apt-cache search snipe                 
esniper - simple, lightweight tool for sniping ebay auctions
orbital-eunuchs-sniper - anti-terrorist, pro-Eunuchs, satellite sniping game
orbital-eunuchs-sniper-data - game data files for the game Orbital Eunuchs Sniper

That will tell you all packages that has in it's description. Then you can do sudo apt-get remove:

sudo apt-get remove orbital-eunuchs-sniper orbital-eunuchs-sniper-data

If you installed the game in the Software Center, you can just:

  1. Go to the Software Center.
  2. Search for it using terms similar to what it was called in the Software Center (which is often not the same as the actual package name).
  3. Uninstall it in the Software Center.

You never even have to know what the package is called.

(This seems to address the actual goal in the question, though answers about searching packages would be good too.)


If you did not use Software Center, use

dpkg -S $(which snipe2d)

See also my blog on dpkg: http://www.linuxintro.org/wiki/Dpkg