Upgrade Linux Mint In The Termanal

If you have chosen Linux Mint as your distro then you have a handy GUI way to upgrade, but today we’ll upgrade Linux Mint in the terminal. This won’t be entirely pointless, as we’ll be doing things the GUI method of upgrading doesn’t do. By the end of this article, you should be comfortable upgrading your system in the terminal.

Additionally, this is going to work for other related distros. This article will apply to you if you use Debian, Ubuntu, an official Ubuntu flavor, and many other distros. More specifically, if you have access to apt, this will apply to your computer.

There are a few confusing terms here. I’ll do what I can to explain.

We often use ‘update’ and ‘upgrade’ interchangeably. I do that myself. In the sense of this article, an update means you’re refreshing the software available to you and then you’d upgrade to the newest versions of that software. So, in the sense of the commands used, they’re not interchangeable.

We’ll be using apt for this article. APT is short for Advanced Package Manager. This is the most common method of managing packages in the terminal, at least for those distributions that use apt. If you check the man page, you’ll see:

apt – command-line interface

And that’s not too descriptive. If we read on, we’ll see:

apt provides a high-level commandline interface for the package
management system.

That’s a bit more promising, as updating and upgrading is indeed managing packages. So, that’s what we’ll be using and you won’t need to install anything if you’re using Linux Mint.

Upgrade Linux Mint In The Terminal:

As you can see, I mentioned that this is to be done in the terminal. That means you need an open terminal. Just press CTRL + ALT + T and your default terminal should open.

With your terminal now open, let’s update the database to see what new software is available for your system. That’s an easy command:

The output will tell you to do so, but you can check the available upgrades with the following command:

You could update them manually, one by one, but you can just use this command:

That will install all of your available updates without asking you for permission to proceed. If the updates do require manual input, it will stop to ask you for your input.

Now, there’s another tool. We can clean up after ourselves, removing software that doesn’t need to be installed anymore. This happens and happens with some regularity. You can run the following command:

If you’d like, you can combine all these commands into a single command:

You can alias that, or leave it in your Bash history, and run that regularly to keep your system updated with the latest (and most secure, generally speaking) software.

Closure:

Yup… It was still a weekend when I wrote this. I also have guests that will be here for a while. So, it’s a fairly short article – but it’s a useful article for those who are running Linux Mint. After all, it’s not all that challenging to upgrade Linux Mint from the terminal and that’s something all Linux Mint users may wish to learn. If you’re in that group, this article is for you…

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.

Reinstall A Package In Ubuntu

There may come a time when your software has gone awry and you’ll want to know how to reinstall a package in Ubuntu. This article will cover this because it seems like a fine (and short) article and this is indeed a weekend article.

While this is specific to Ubuntu, it’s going to work in any distro out there that uses apt or apt-get. Technically, I’m doing this in Lubuntu, but Ubuntu is a more widely searched term. That’s why I’m going with this one.

So, what are we doing?

Well, we’re going to reinstall a package, that is software, in Ubuntu. We’ll be doing so from the terminal and it’s a very easy process. We will be using the terminal, so open your default terminal by pressing CTRL + ALT + T.

The tools… You won’t need to install anything new!

apt:

If you’ve installed software in the terminal, you’ve probably used apt (Advanced Package Tool). If you do some digging, you’ll see that it’s a front end for apt-get (which is in itself a front end for dpkg, more or less). Apt is the less-stable binary compatible with apt-get. If you want something long-term, use apt-get. If you’re writing an article for this moment in time, feel free to use apt.

When you check the man page, you’ll see apt is described like so:

apt – command-line interface

That’s not particularly helpful. Let’s check the real description:

apt provides a high-level commandline interface for the package management system. It is intended as an end user interface and enables some options better suited for interactive usage by default compared to more specialized APT tools like apt-get(8) and apt-cache(8).

So, as you can now see, this is the correct tool for the job. We’ll definitely be doing stuff in the ‘package management’ category.

apt-get:

I’ll be including apt-get commands by default. Why? For the sake of completeness. It’s not that much effort to add them and the article would be shorter without them. So, I’m using them. Let’s check the man page…

apt-get – APT package handling utility — command-line interface

That’s descriptive enough. You can see that apt-get is a package handling utility and that’s what we’ll be doing. We’ll be handling (managing, if you prefer) packages. 

These sorts of tools are installed by default on Ubuntu. They’re also installed by default on Lubuntu, Mint, ElementaryOS, Debian, and many more Debian derivatives. As I said, you won’t have to install anything new for the sake of this article.

Reinstall A Package In Ubuntu:

Let’s say you have some software that’s not behaving quite right. One of the steps you might take is reinstalling the software. Bits may go awry and sometimes things get messed up as you tinker. For whatever reason, you may want to know how to reinstall a package in Ubuntu. Again, that’s what this article covers. (So many people skip the intro!)

I’ve already told you how to open a terminal. This is done in the terminal.

First, we want to talk about how you reinstall a package. The syntax is simple:

You can do the same thing with apt-get.

That will reinstall an application, all nice and easy. It will only reinstall the application. Many applications don’t stand alone but have dependencies.

Fortunately, you can not just reinstall a package in Ubuntu – you can reinstall a package in Ubuntu and reinstall the dependencies. You just need to know what the dependencies are. For that, you’d run this command:

Once you have that information, you can combine the whole thing into a single command. All you need to do is add the package names to the commands. For example:

So, it’s pretty easy to reinstall a package in Ubuntu. 

Closure:

Technically, this was written on a Friday. It’ll be published on a Saturday. So, it’s a weekend article! That means it’s fairly short and fairly easy. I might as well have an easy day. Besides, I wrote another article already today. You won’t see it for a while, but it is written and scheduled for publication. I’m kind of ahead of the game in some regards.

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.

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.

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.