Install Flatpaks In Lubuntu

This shouldn’t be a very long article and will apply to other distros, but this is how you install Flatpaks in Lubuntu. This seems like a good article to write as it’s something tucked into my notes and something I’ve not written about before.

This article applies to Lubuntu. It may apply to other distros, especially those in the Lubuntu family. In some cases, such as Linux Mint, recent versions come with Flatpak support. In those cases, you don’t need to do anything special, you can start using Flatpaks as soon as you’d like.

What Are Flatpaks:

Flatpak is a utility for software deployment. It was once known as xdg-app but has used the Flatpak name for going on a decade. This is not something new, even though it has recently grown in popularity. They’re pretty handy.

The thing that makes Flatpaks special is that they run in a sandbox. That means they don’t interact with other software on your system, they run in their own isolated memory space. This is good for security.

They’re also good for easy installation. Not only do they run in an isolated environment, they are self-contained. With Flatpak being what it is, you don’t have to worry about dependencies.

If a Flatpak does need to integrate with the system, this will be set by the developer. The advanced user can change those permissions, though that may cause breakage should you restrict the access levels.

There’s also a central repository that you can use. While you can get a Flatpak from anywhere, and you can add your own repositories, the most common use will be from a central repository which does things like providing updates to the packaged software. 

This is good for developers who want to distribute their software while not having to do so for the various package managers. Rather than a .deb or .rpm version, they can upload and update a Flatpak that’s stored in a centralized repository.

Pretty neat!

Install Flatpaks In Lubuntu:

For the sake of this article, Flatpak is the software type and the delivery mechanism, while Flatpaks are the applications installed via Flatpak. Make sense? I hope so because that’s what I’ve got.

I should probably have mentioned that earlier in the article…

Anyhow, to install Flatpak you’ll need an open terminal. As you’re using Lubuntu, you can open your default terminal by pressing CTRL + ALT + T on your keyboard.

With your terminal now open, let’s install Flatpak so that you can install all the Flatpaks your heart desires. To do that, run this command to install Flatpak:

That will install Flatpak, but you will then want to enable the Flatpak repository. That’s another easy command that you can cut and paste:

Next, you’ll need to reboot. Yes, this one should have a reboot to work properly. Run this command in the terminal:

That’s all you need to do.

Installing Flatpaks:

Now you have enabled Flatpak and you’ve added the default Flatpak repository. You can head to the centralized repository and start browsing for interesting software. You do that here:

Flathub, the Flatpak Repository

I’ll give you an example, to make it easier…

Let’s say you want to install ONLYOFFICE as a Flatpak.

Well, you browse/search for it and end up at the ONLYOFFICE repo page.

Once you’re there, you’ll see an “Install” option in the upper right section of the page. There’s a down-arrow next to it, which is the easiest method. Click that and run the command prompt in your terminal.

In this case, that command prompt would be:

You can then run the application with this command:

No, you shouldn’t need to run the program through the terminal. Because you rebooted, added Flatpaks should appear in your application menu in the appropriate category section. 

Also, it’s a bit more of an interactive process when you’re installing Flatpaks through the terminal. You’ll be given a few options along the way, though I just accept the defaults (by pressing the Y key) and call it good.

You’ll also notice that the applications are much larger. If you have slower internet, you’ll notice this. This is because the Flatpaks are isolated and come with the required dependencies. Because of this, the packages are quite a bit larger.

Once in a while, I’ve noticed that the application won’t appear until a reboot happens. If you run the terminal command once, that seems to help it, and then appears in the application menu. It’s not perfect, at least not here, but it’s definitely ‘good enough’ and it’s a great way to get sandboxed software that doesn’t require hunting around for dependencies.

Closure:

So, that’s how you install Flatpaks in Lubuntu. It’s also probably how you install Flatpaks in ElementaryOS, Kubuntu, Xubuntu, etc… However, if you’re installing Flatpaks in Ubuntu there’s an extra step you can take that lets you integrate Flatpaks better with the GNOME desktop environment.

If you’re using Ubuntu, you can add this command before the reboot step:

I believe that will add Flatpaks to your regular software store, that is the GUI one where you’d go to add software. I’m not sure because I don’t use Ubuntu, but that’s what the command looks like it will do. I’d normally not share any code I haven’t used myself, but I took the command from Flatpak’s site, which makes me think it’s correct.

Anyhow, Flatpaks are easy to install and run more securely. If your OS changes underneath, this won’t matter. The software comes with the appropriate dependencies. Once you’re more familiar with the software, you can change the permissions if you want. I’ve yet to find a single reason why I’d want to modify the permissions – but it’s possible.

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.

Disable A PPA The Hard Way

Today’s article is just for fun, as there’s usually a handy graphical way because we’ll be discussing how to disable a PPA the hard way. This is mostly an exercise in fun and education. It’s something you can do, but you do not need to do. We’ll be learning how to disable a PPA the hard way, specifically through the terminal.

If you’re interested in doing things the hard way, read on! We’ll have fun with this one, and having fun is essential.

There’s an easy way to manage your PPAs, and this is not that. In your application menu, look for ‘Software Sources’ and do that. Do not do this – unless you have no graphical environment.

A PPA is something used by Ubuntu, but is also used in Mint and is possible to use in others – like Debian which strongly suggests against it. PPA stands for Personal Package Archive and is meant to be exactly that. It’s us that abuse the idea, which is kind of how we ended up with Ubuntu Snaps and other similar package formats.

We use PPAs for all sorts of things, like adding entire other repositories to install custom software. It’s meant to be your personal package archive – meaning personal. We’ve decided it’s a fine way to add repositories to install software not included by default. Oops!

So, we’re going to disable a PPA, and we’re going to do it the hard way. We have no reason to do it this way, at least on desktop Linux, but we can. And so, just because we can, we have this article.

Disable A PPA The Hard Way:

Yeah, we’re doing this the hard way. So, that means we’re going to need an open terminal. If you don’t know how to open a terminal, you probably shouldn’t be doing this. But, just in case, you can normally press CTRL + ALT + T and your default terminal will open. Otherwise, you can open the terminal from your application menu.

With your terminal open, you need to first know what repositories you have available to you. You need to know the added PPAs. That’s easy enough, just enter the following commands:

That will change you to the correct directory. We’ll now list the files like this:

That will show you an output similar to this:

Find the PPA you want to remove. In our case, we’ll use teamviewer.list as the PPA (or ‘regular’ repository) we wish to remove. This works for both PPAs from LaunchPad or other repositories you may have added.

So, you’ll want to use Nano for this. Odds are that Nano is installed by default these days, but this is not always true. So, read the following page before moving on.

Let’s Install Nano (With Some Bonus Information)

So, we want to edit the teamviewer.list to disable the TeamViewer repository. That’s done with Nano and the command looks like this:

You’ll then be faced with a text file. Look for the line that starts with deb and is not commented out, that is not starting with a #  symbol. For example:

Find the correct line to edit when trying to remove a PPA.
This should be fairly easy for anyone to follow. It’ll be the line without the pound sign.

So, in my case, I’d take the line that looks like this:

And I’d comment out that line. More specifically, I’d add a # sign at the front of that line. So, it’d look like this:

You’ll then need to tell Nano to save the file. That’s easily done. You can just press CTRL + X, then Y, and then ENTER to save a file with Nano.

Next, you do this for any repositories (not just PPAs) that you wish to remove. Be aware that the software installed from those repositories will no longer update (which can be a bad thing). If you remove a PPA and still have the software installed, it should be temporary so that you can troubleshoot something.

Otherwise, you can now verify this. You simply need to update the available software again. You do that with this command:

When you do that, you should find that you no longer have that PPA (or just regular ol’ repository) enabled. It will no longer update, thus no longer offer you new versions of that software.

The latter part of that previous paragraph should be considered essential.

So, choose carefully. If the repository has software that you plan on using, you should probably keep updating it. Many of the updates aren’t just bug fixes. Oftentimes, they’re legitimate security fixes. Software is software, regardless of the operating system. It has bugs and sometimes those bugs are security issues. It’s best to keep your system updated and doing so makes you a good Netizen.

Closure:

So, yeah… We’ve discussed how to disable a PPA the hard way. You can disable any repository this way, I suppose. I’m not sure that I’d suggest doing it this way – unless you need to do it this way. If that’s the case, you should do it this way. Most of the time, there are nice handy graphical tools to manage that sort of stuff.

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.

How To: Remove AppArmor From Ubuntu

In today’s article, we’re going to learn how to remove AppArmor from Ubuntu. This will work for other distros, like Debian. It’s actually not a very difficult task to remove AppArmor from Ubuntu, but it’s not something you necessarily want to do. Just because you can, doesn’t mean you should…

As many of you know, I write many of these articles based on the notes I’ve taken over the years. I’m a little reluctant to write this one, because removing AppArmor is probably not the best of choices.

AppArmor is similar to the various jails and application isolation techniques. It’s a security tool that restricts applications to a constrained set of resources. If the application is then compromised, it only has access to that set of resources and not to the whole system.

In other words, unless you know what you’re doing, you almost certainly don’t want to remove AppArmor from Ubuntu. In fact, if you don’t know what you’re doing then doing this is almost certainly a ‘not-bright’ choice.

If you’re going to remove AppArmor, you should consider replacing it with something else. SELinux is an option that’s similar, though I suppose you could use something like Firejail and be prepared to craft your own application profiles.

Again, removing AppArmor from Ubuntu (or whatever distro you’re using that has it) is probably not a good idea. I include the article because the information is already out there and because some folks may just decide to operate their system without such protections. This is Linux, you have the freedom to make bad choices. This isn’t even the first time I’ve shown you how to make bad choices.

Remove AppArmor From Ubuntu:

Like oh so many of these articles, you’re gonna need an open terminal. Just press CTRL + ALT + T and your default terminal should open. (I say that a whole lot on this site.)

We should first check to ensure AppArmor exists and is running. To do so, enter the following command:

What you’re looking for is several lines into the output. You’re looking for ‘apparmor module is loaded‘. If you see that, AppArmor both exists and is running. So, the next step in removing AppArmor is to stop the service. You do that with:

In case AppArmor is somehow installed again, we’ll make sure that it won’t start at boot by disabling the service entirely. That seems like a good idea.

Finally, we nuke AppArmor from existence with a purge command:

And that should do it. You probably want to reboot, just to make sure there are no tendrils sticking around – but stopping the service first should mean you don’t need to. Either way, you have now removed AppArmor from your system – assuming you followed the directions.

Closure:

Again, and I can’t stress this enough, don’t do this unless you know what you’re doing and unless you have something to replace AppArmor with. It’s really a bad idea and you’ll gain very little. I wouldn’t even do this with a system air-gapped from the network, unless I had a very good reason to do so.

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 own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

How To: Completely Remove Software In Ubuntu

Today’s article is going to show you how to completely remove software in Ubuntu. This will also work for other distros that use apt as their package manager. It’s a pretty handy tool to have in your toollbox, because we’ll not only be removing software, we’ll also be removing any config files associated with said software. It’s not all that difficult, and anyone should be able to understand this article.

When you ‘remove’ software, be it with the GUI or with the terminal, you’re actually only removing the software itself. You’re often leaving behind the config files (if there are any) and the ‘remove’ may leave dependencies still installed. The reasoning for leaving config files behind is presumably so that you can reinstall the software and have the same configurations you had earlier in time.

As you can guess, that’s not always a good thing… It may well be those configuration files that caused some sort of error in the first place. It may well be those config files that prompted you to remove the software in the first place. Erasing and starting anew might be your only realistic path forward, especially if reverting to backups did not work.

So… That’s why we have this article. This article is going to teach you how to completely remove software in Ubuntu. If you want, you can still try removing software and reinstalling (as a troubleshooting step), and this then becomes one of your later troubleshooting strategies. Read on, and you’ll see…

Completely Remove Software In Ubuntu:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

When you remove software with the terminal, you probably do it like so:

That’s great. It removes the application and may even remove some of the dependencies it pulled in when you installed it. This is not necessarily a bad thing – but we want to completely remove software in Ubuntu, and this is how you do it.

As I said in the preamble, using the above command will likely leave your configuration files behind (if there are any) and some dependencies. With the ‘purge’ command, you’ll get rid of those configuration files. To do this, you’ll want to:

While that’s great and all, when you installed your application you may well have installed some other applications (dependencies), that is some applications that the software depended on. Those too may have config files related with them and to really ensure you’ve completely removed the software, you’ll want to do an autoremove. 

If you’re unfamiliar with the autoremove function of apt, the man page has it summed up nicely:

autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed as dependencies changed or the package(s) needing them were removed in the meantime.

You don’t specify an application with the ‘autoremove’ command,  you just run:

That should do it, actually. The last command should remove any dependencies that were installed and not removed automatically when you purged the software with the commands above.

Closure:

And there you have it! It’s another article! I still haven’t missed a day, and I’m well beyond my initial obligations. This time, the article tells you how to completely remove software in Ubuntu – and it’ll work in any distro that uses apt. It’s a pretty simple thing, but it’s worth knowing. Eventually, it’s bound to come in handy.

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 own 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.