Ubuntu – How to remove a package whose correct name you don’t know

aptcommand linesoftware-centeruninstall

I had downloaded arc-theme-solid_1450051815.946cbf5_all.deb file from http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_15.04/all/ and had installed it using the Software Center but when I decided to uninstall it wasn't showing up in the Software Center. I thought of removing it via the terminal but couldn't think of the correct name of the package to uninstall. This has been the general problem associated with installing any package outside the Software Center. Also, is the name of the package to uninstall the same as that of the .deb file?

Best Answer

You should be able to use dpkg -I or dpkg-deb -I to show information about a package by reading the deb file. From man dpkg

   dpkg-deb actions
          See  dpkg-deb(1)  for  more  information  about  the   following
          actions.
          .
          .
          .
          -I, --info archive [control-file...]
              Show information about a package.

e.g.

$ dpkg -I arc-theme-solid_1450051815.946cbf5_all.deb
 new debian package, version 2.0.
 size 286706 bytes: control archive=42665 bytes.
     421 bytes,    12 lines      control              
  147142 bytes,  1477 lines      md5sums              
 Package: arc-theme-solid
 Version: 1450051815.946cbf5
 Architecture: all
 Maintainer: Horst3180 <horst3180@gmx.net>
 Installed-Size: 4307
 Depends: gnome-themes-standard, gtk2-engines-murrine
 Conflicts: arc-theme
 Replaces: arc-theme
 Section: misc
 Priority: optional
 Description: Arc is a theme for GTK 3, GTK 2 and Gnome-Shell.
  It supports GTK 3 and GTK 2 based desktop environments like Gnome, Unity, Budgie, Pantheon, etc.

So in this case, the package name is arc-theme-solid

Related Question