Installing Applications With DPKG

If you are installing software via the terminal, you may want to learn more about installing applications with dpkg. It’s a simple process and I’ll also cover how to uninstall software with dpkg. It seems like the thing to do and it seems like a handy article to write, especially for new users.

You should probably know that apt is a frontend for dpkg and I’d suggest using apt to install software. That article does mention dpkg, but this article will be exclusively about installing (and removing) applications with dpkg.

The main reason I’d suggest using apt instead of dpkg is because apt will manage dependencies automatically. That’s a pretty handy feature. Still, you might as well learn to install applications with dpkg. You might as well also learn about uninstalling applications with dpkg.

This article only applies to distros that support dpkg as their package manager. That’d be distros like Debian, Ubuntu, Mint, and the many other Debian derivatives.

What is DPKG:

You won’t have to install anything. If your distro supports dpkg, it will be installed automatically. You can verify that dpkg is installed with the following command:

The reason for this being a Debian (and derivative) thing is obvious when you check the man page. If you do that, you’ll learn that dpkg is:

dpkg – package manager for Debian

Installing software is definitely managing packages. That means this is one of the correct tools for the job. There are graphical ways to do this and you can easily install software with gdebi.

Anyhow, you can even visit the dpkg homepage. That’s the tool we’ll be using to install software.

Installing Applications With DPKG:

This is one of those articles that requires an open terminal. That’s a fairly common thing around here and most of you know that you can open your default terminal simply by pressing CTRL + ALT + T.

With your terminal open, let’s all start on the same page…

In our example, we’ll use XnView MP. You can download that with this command:

If you’re using a 32-bit distro, there’s no current XnView MP available. They’ve stopped development, but you can download an older version.

Now that you have XnView MP downloaded, you can install applications with dpkg with the following syntax:

Or, in our case, we’d install XnView MP with this command:

(Don’t forget that you can use autocomplete.)

See? It’s fairly easy to install applications with dpkg. I picked this XnView Multiplatform because it doesn’t have any dependencies in my testing. That keeps it relatively simple.

If there were dependencies, you could install them manually with dpkg. You can do that, or you can just use apt (which, again, you probably should have used in the first place). To do that, it’s simple:

If you’re going to have to run an apt command after installing applications with dpkg, you might as well use apt in the first place. When you install packages with apt it will also resolve any dependencies (if those dependencies can be satisfied).

Removing Software with DPKG:

Yes, you will still need an open terminal if you want to remove software with dpkg. It only stands to reason. So, if you’re here for just this section of the article, open your terminal. There are directions above if you’re new to Linux.

The syntax to remove software with dpkg is also quite simple.

NOTE: The package name is going to have a different name than the installation package, lacking at least the .deb portion. You can find the name with this command:

So, in our example, we’d try a command like this:

Sure enough, it returns this:

So, we can see the application name is not the same as the package name. In this case, the name is ‘xnview’. That means we’d use this to remove the package:

That removes the application but it retains the configuration files. This means you can install the application at a later date and still have the same configuration you had before you removed the application.

See also: ‘sudo apt remove’ vs ‘sudo apt purge’

If you want to uninstall the application and remove the configuration files, you can just use the -P (purge) flag. The syntax follows:

If we use this command with our example application, it’s like this:

Now, if you want to pretend this article never happened, we can clean up after ourselves with the following command:

That will delete the .deb file, meaning we’ve left no evidence behind (assuming you purged the application). Of course, you no longer have that particular graphics viewing, organizing, and light editing application installed. That’s entirely up to you.

Closure:

Well, if you ever needed to know about installing applications with dpkg, this was the article for you. We even discussed the process of removing the application and cleaning up after yourself. Good times!

If we wanted to be ‘more correct’, we’d say that we started with a package and installed an application. I figured I’d aim at the more generic words in hopes that newer users find this information and find it relatable.

There’s a limit to what you can ‘optimize’ for (meaning ranking in search engines) so I do what I must. I work on SEO (search engine optimization) because the site’s pointless if it doesn’t help anyone.

The whole goal is to get my notes (and more) online so that the site becomes a resource. More specifically, the end goal is to make Linux more approachable. Now if I could just make the site break even…

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

List Installed Software In Lubuntu

There may come a point in your Linux journey where you must list the installed software in Lubuntu. This is easily done and I will show you a couple of quick ways to get this list in the terminal. So, if you want to list installed software in Lubuntu, this is the article for you!

I’m writing this article because it’s quick and easy. I won’t make this article as long as I’ve made recent articles. We’re just going to get to the point, more or less. I will show you a couple of different ways, each with its own merits. You can decide which way works for you.

The article headline and related material reference Lubuntu. That’s because I’m using Lubuntu when I write this article. I am a Lubuntu member, after all. It makes sense that I’d be using Lubuntu!

Plus, it’s a weekend. I’ve formalized the idea that articles written during weekends will be easier. I have a life outside of writing articles and doing other things to help the Linux community. (It’s amazing, but it’s true!)

However, you can use these commands on anything that uses dpkg or apt. That means you can use these commands on Debian, Linux Mint, Ubuntu, and myriad other distros that use .deb files as their software packages. These commands are fairly universal across those distros and you shouldn’t have any issue running either of them on any of those machines.

Caveat:

The following commands will not show you Snap packages or flatpak packages. Software installed by those means does not show up in these commands. Only software installed with dpkg/apt (which includes all .deb packages even if you used a GUI installation method) will be shown.

Fortunately, that’s not a problem.

To show flatpak applications:

To show Snap applications:

AppImages aren’t really installed and I can find no way to list those that make sense. Sure, we could use the find command and list any .appimage file, but that won’t tell us if you use it. We’ll just ignore those for the sake of simplicity and to stay within the realms of ‘reasonable’.

List Installed Software In Lubuntu:

In the opening paragraph, I mentioned that this was something you’d be doing in the terminal. That means you need an open terminal. As you’re using Lubuntu, you can just press CTRL + ALT + T and QTerminal should open right up.

With your terminal now open, the first command we’ll be using is dpkg. This will not show all the installed applications at the same time. This outputs a nicely formatted list. You can see the version of the software on the right. It’s easy to understand.

It will show you a page at a time and your arrow button lets you scroll down to see them all. To exit the list, you press the Q button on your keyboard. To list installed software in Lubuntu with dpkg, you simply run the following command:

The second command might be a little more useful, but it’s not formatted nearly as nicely. This time around, we’ll be using the apt command. If you don’t know, apt is basically a front end for dpkg. Now you know.

If you want to use apt to list installed software in Lubuntu, you would just run the following command:

That will spit out the entire list, though you could pipe it to the less command. To do that, try this command:

That will output the list a page at a time. Like the above dpkg command, if you want to exit the list, you just press the Q button on your keyboard.

This command is also useful to create a list of installed applications. Again, this won’t list Snaps or flatpaks, but it will list the traditionally installed applications. That means it’s pretty useful to create a list, especially if you want to recreate the system later. To do that, just run this command:

There you go, you now have a handy list of installed applications in Lubuntu! Pretty easy, isn’t it?

That’s all there is to it today. 

Closure:

Yeah, it’s a weekend. This article might just break 800 words, so it’s not nearly as long as many of my recent articles. This time around,  you’ve learned how to list installed software in Lubuntu. It wasn’t even that complicated and you’ve been given the choice between two commands. Just pick the one that works for you and commit it to memory. You’ll be golden and have taken one more step in your route of Linux learning.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Show Files Installed With A Package (Using ‘dpkg’)

Today’s article is going to be quick and easy, as we simply cover how to show files installed with a package. Because I am reasonably compelled to optimize for search engines, the title just plain sucks. It should be much longer. Even though the exercise is really simple, explaining what we’re doing is a bit more complicated.

NOTE: The ‘dpkg’ may confuse some folks, but it means this article is only valid for those folks who are using .deb files, the apt package manager, and nothing else. So, if you’re using Debian, Ubuntu, Mint, or similar, then this article is meant for you. If you’re using a different distro, maybe I’ll cover those in another article.

So, what exactly are we doing?

Well, when you install software you don’t generally install just a single file. At least not if the software is all that complicated. 

Instead, you install all sorts of other files along with the software you’re installing. You don’t just install a single binary file, you install quite a few other files along with it.

Today, we’re going to list the files, the dependencies if you will, that go along with the applications we install. It’s not difficult, just a single command, but you can see why this would make for a very long article title.

Let’s keep this article short, as I’ve done some longer material lately:

Show Files Installed With A Package:

Yeah, you’re going to need a terminal for this. If you want to use ‘dpkg’ then you will need an open terminal. As that’s what we’re using, we need said terminal. In most distros you can just press CTRL + ALT + T and your default terminal should open.

The tool we’re using is ‘dpkg’ and the man page describes it like this:

dpkg – package manager for Debian

The ‘Debian’ bit is important. As I mentioned above, this only works for distros that use dpkg to begin with. Anyhow, that’s an accurate description of what dpkg does.

The command we’ll use is simply:

For example, you might try:

If you have Chrome installed,  you might try this command:

As you can see from the output, you’re generally installing a bunch of files when you install a new application. It may not appear that way during the installation process, but you’re most likely installing more than a single file each time you install an application.

Closure:

If you’ve ever wanted to show files installed with an application, now you know. It’s a pretty handy command to have if you’re into that sort of thing. If you’re playing the game of the lightest-possible-distro, then maybe you want to keep the number of files installed to a minimum and use the lightest software you can. Either way, it’s an informative command that should amuse my readers for five to ten minutes.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.