1

I installed Visual Studio Code on Ubuntu using:

sudo apt install ./code_1.37.1-1565886362_amd64.deb

I then found these commands to try to find out more information about the package:

dpkg -l dirmngr
systemctl --user status dirmngr
apt-cache search code

I still see it on my ubuntu application gui but I can't find it in the uninstall options. I also tried erasing the .deb file. What tools can I use to see these package details? How do I fully remove this installed program? Is there a folder that .deb files install into? Will it show up in /bin?

  • dpkg-query -s code is a possibility – schrodigerscatcuriosity Aug 23 '19 at 18:47
  • To install deb packages use dpkg -i <package> or gdebi <package>. – schrodigerscatcuriosity Aug 23 '19 at 18:52
  • 1
    The .deb file is an archive containing 3 files, one of which is a compressed tarball of all the files to install into /usr/bin, /usr/share etc. Once the program is installed then you don't need the deb file anymore. To uninstall you should be able to say apt remove code. I have no idea why you are asking about the dirmngr which is the server for X.509 certificates if you want info about code. – icarus Aug 23 '19 at 20:00
  • Thank you. I'd love to find more information on the folders and files used in the installation process. Also, I'd like to learn more about environments. – Oscar Evolves Aug 26 '19 at 17:35
1

I am also very confused by seeing dirmngr as the pattern you searched for.

1.However, in case you ever have a .deb file that you installed but don't know what actual package it corresponds to you can run dpkg-deb -W.

Just to illustrate, using epson-printer-utility_1.0.2.deb as an example:

 $ ls *.deb
 epson-printer-utility_1.0.2.deb

 $ sudo dpkg-deb -W epson-printer-utility_1.0.2.deb
 epson-printer-utility  1.0.2-1lsb3.2

2.What is interesting is that trying to figure out what package got installed from the original .deb filename is never a good idea, because if you just make a copy and give it a different name :

$ cp epson-printer-utility_1.0.2.deb abcde.deb

$ sudo dpkg-deb -W abcde.deb
epson-printer-utility   1.0.2-1lsb3.2

3.And finally if you ever want to find all the info from a given .deb, and especially whether you have that particular package already installed, you can run sudo dpkg-query -s [package name given by dpkg-deb] or in one step (replace "abcde.deb" by your .deb file, put in "" if it has spaces):

sudo dpkg-query -s $(dpkg-deb -f abcde.deb | grep "Package" | cut -d: -f2)

Package: epson-printer-utility
Status: install ok installed
Priority: extra
Section: alien
Installed-Size: 10652
Maintainer: Seiko Epson Corporation <linux-printer@epson.jp>
Architecture: amd64
Version: 1.0.2-1lsb3.2
Depends: lsb (>= 3.2)
Description: Epson Printer Utility for Linux

Update

For the final command one can "usually" also use a slightly shortened version:

dpkg-query -s $(dpkg-deb -W abcde.deb |cut -f1)

as long as someone doesn't go crazy and create a package with a [TAB] inserted in the name, because with CTRL+VTAB a filename can actually be made to look like this:

$ cp abcde.deb "abc  de.deb"
$ ls 
'abc'$'\t''de.deb'   abcde.deb

Yet it will still work just as intended:

$ dpkg-deb -W 'abc'$'\t''de.deb' 
epson-printer-utility   1.0.2-1lsb3.2
| improve this answer | |
  • This is great, thank you. Where would be a good place to find documentation on the dpkg command? – Oscar Evolves Aug 26 '19 at 17:32
  • dpkg is a beast of a package, I would still recommend you install all the dpkg-* packages, because as time goes on you will find more and more uses for all the various commands that begin with dpkg- . As far as documentation/overview/tutorial for dpkg as well as package management in Debian, I recommend [link]debian.org/doc/manuals/packaging-tutorial/…. Also, while you cannot upvote answers yet, please accept the answer by clicking the button below the two arrows if you found it helpful, that way others in the future will see it. thanks – BarBar1234 Aug 26 '19 at 17:56
  • Thank you, BarBar1234, thats a great resource. How about documentation for curl? I installed the IBM_cloud_cli using curl -fsSL https://clis.cloud.ibm.com/install/linux | sh However, I could not use dpkg to find information on this installation. Is this a different package manager? Is this better that using .deb instillations? – Oscar Evolves Aug 30 '19 at 18:01
  • curl is a URL puller/downloader. In your case IBM_cloud_cli is NOT a package, but a BASH script (easily identifyable by #!/bin/bash as the first line). the sh command is responsbile for executing the script. If you run file linux in the same folder where you downloaded that file, it will tell you that it is a linux: POSIX shell script, ASCII text executable as opposed to epson-printer-utility_1.0.2.deb: Debian binary package for my example above. A script is comparable to a short windows BATCH file (.bat extension) while a package would be comparable to a program installation. – BarBar1234 Aug 31 '19 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.