Find package name using terminal

Hello I want to remove software (for example transmission) using Terminal. How can i find the package name for the software ?


search for it using

apt-cache search name

like

apt-cache search transmission

gives:

conkytransmission - Transmission torrent info, for use in Conky
transgui - Remote GUI for Transmission daemon     
transmission - lightweight BitTorrent client
transmission-cli - lightweight BitTorrent client (command line interface)
transmission-common - lightweight BitTorrent client (common files)
transmission-daemon - lightweight BitTorrent client (daemon)
transmission-gtk - lightweight BitTorrent client (GTK interface)
transmission-qt - lightweight BitTorrent client (Qt interface)

at the last (the most relevant results will be at the last since it is the terminal)


To query installed packages we can use powerful search functions from DPKG package management:

  • dpkg-query --list 'pattern*' lists all packages that have not been purged
  • dpkg-query --search 'pattern*' searches for individual files installed

You can use wildcards in the search pattern to find packages when only part of the package name is known.