Manage your apps
Nick Peers reveals where to find apps, but more importantly how to install, update and – if necessary – purge them from your system.
Nick Peers reveals where to find apps, plus how to install, update and – if necessary – purge them from your PC, alongside stores and new-fangled snaps.
What is Linux without the various applications and programs you run on it? There’s a rich collection of programs covering just about every aspect of your computing life waiting to be discovered, and in this tutorial we’ll reveal everything you need to know about tracking down apps and installing them, along with removing unwanted programs when you’re done with them and ensuring Ubuntu (and its spin-offs) cleans up behind itself.
Where to find apps
The first place to start looking for apps is your distro’s software centre; in Ubuntu it’s easily accessible from the Favourites bar. This provides a convenient graphical frontend to all the software repositories installed on your PC. Repositories are convenient storage locations for finding, installing and updating software on your PC, and come in the form of ‘package lists’, which include the package names and version numbers.
When you first launch Ubuntu Software you’ll see a home page providing shortcuts to six categories of application, along with some recommendations. Click one to read a description and view ratings and reviews – pay particular attention to the Details section, where you’ll be warned if an app requires ‘unconfined’ access to all personal files and system resources.
If you like the look of it, click Install, enter your user password and wait for the program to be downloaded and installed. Once installed, you see a row of buttons, including options for launching and removing (uninstalling) the program. You may also see a Permissions button – click this to set up specific permissions for the app. For example, Audacity enables you to grant access to files in your home folder, play and record sound and read/write files on removable storage devices.
View previously installed apps – including those that came with Ubuntu – by selecting the Installed button at the top of the Ubuntu Software window. Apps are divided into three sections: regular apps at the top, system apps in the middle (these cannot be removed as they’re required for the Gnome desktop) and any addons. A third button provides a convenient shortcut to any outstanding updates, although Ubuntu’s default setting will ensure apps are kept updated alongside Ubuntu itself (see below).
Manage repositories
The easiest way to view and manage software repos is through the Software & Updates package. Open the launcher and search for ‘software’ – you should find Software & Updates is the second package in the list. If Ubuntu Software is already open, you can also open it quickly via the Ubuntu Software menu (choose ‘Software & Updates’).
This will open a multi-tabbed window; the first two tabs are of interest to us. The ‘Ubuntu Software’ tab enables you to pick and choose which of Ubuntu’s main four repos you want to use: main, universe, restricted
and multiverse. Each one comes with a clear description; for instance, multiverse gives you access to Linux apps that aren’t open source.
There’s also a box that you can tick to enable you to include the Ubuntu 18.04 installation DVD as a repository. In the vast majority of cases you should leave this unticked to avoid update errors being triggered every time you update your software.
Switch to the ‘Other Software’ tab and you’ll discover an additional repository: Canonical Partners. Disabled by default, this provides access to free, but not opensource, software like the Adobe Flash plug-in. Ticking the box should prompt you for your user password to confirm you want to add the repo.
Add new repositories
One of the drawbacks of the official Ubuntu repos is that all included packages are fixed at a specific version, tested prior to the release of your version of Ubuntu. They’re updated with bug fixes and security patches, but that’s all. This means that, particularly with Ubuntu 18.04 LTS which is now 18 months old, the apps offered are often outdated.
The solution lies in looking for so-called PPAS, or personal package archives. These repos provide updated software as well as programs not found in the main Ubuntu repos, but there is one potential drawback: provenance. A PPA can contain any software, and once you’ve added it to your system you are at the mercy of that PPA. This is why it’s very important to source PPAS from trusted sources such as https://launchpad.net/ ubuntu – simply enter your desired package into the search box to track down information about it, or visit its web page for details of how to install it.
Another potential issue is compatibility: installing a newer version of an app can mean it now requires certain dependencies be updated too. Updating these may lead to breaking other apps that are configured to work with the older version of the package. Thankfully, many packages go to the trouble of providing separate PPAS for different Ubuntu builds, so if you’re an Ubuntu 18.04 user, make sure you add the 18.04 (or ‘Bionic’) PPA. This should ensure that the app, and all subsequent updates, play nicely with your setup.
There are two ways to quickly add repos to your Ubuntu install: first is to click the Add… button on the ‘Other Software’ tab in Software & Updates. Enter the repo address (for example, deb https://dl.winehq. org/wine-builds/ubuntu/ bionic main) and click ‘Add Source’. Enter your user password and click Close followed by Reload to update the cache with the contents of the newly added PPA, then follow the instructions on the site in question to install it.
Some PPAS require you to first download and add an encryption key; if you get an error attempting to update a repo after adding, this may be the reason. In the case of the Vivaldi web browser, for example, enter the following commands:
$ wget -qo- https://repo.vivaldi.com/archive/linux_ signing_key.pub | sudo apt-key add –
$ sudo add-apt-repository ‘deb https://repo.vivaldi. com/archive/deb/ stable main’ $ sudo apt-get update
Finally, install your package:
$ sudo apt-get install vivaldi-stable
Synaptic Package Manager
There are several drawbacks with the Ubuntu Software tool: it’s not comprehensive, and it doesn’t show all the packages from the repos installed on your system. Thankfully there’s an alternative you can install:
Synaptic Package Manager. Its advantages include giving you greater control over the whole application management process, along with full access to all packages in each repo. You can install Synaptic Package
Manager one of two ways: first, open Ubuntu Software
and search for synaptic . Click ‘Synaptic Package Manager’ followed by Install. Alternatively, open Terminal and issue the following command:
$ sudo apt-get install synaptic
After installation, launch Synaptic Package Manager from the launcher, entering your password when prompted for elevated access. The annotation on page 62 provides a handy orientation guide to navigating
Synaptic Package Manager – you’ll see that it provides a wider range of tools for viewing and displaying information about packages.
‘other sources’
The problems with installing and updating software from repos has led to the growth of various alternative ways of packaging and distributing software. Ubuntu developer Canonical has developed the Snap Store, a platform designed to make it easy to install a variety of apps across most flavours of Linux. Unlike regular apps, which work in tandem with dependencies installed on your system, snaps includes an app with any dependencies it needs to run in an isolated space. Not only do they not rely on system dependencies, their sandbox-like nature makes them more secure – they’re completely separate to the rest of your Ubuntu installation unless you expressly grant access to specific elements (such as files and folders, the internet or a hardware device) when running the app.
Another advantage of snaps is that you can easily switch between different channels – say alpha, beta and stable. Snap support is baked right into Ubuntu 16.04 and Mint 18.2 or later, and snaps can be installed from the Ubuntu Software app (look for ‘Snap store’ next to Source when installing programs). To switch channels, click the current channel button (typically ‘Stable’) to see what other channels are available, then click Switch to jump to your chosen channel.
Snap can also be installed manually in earlier versions of Ubuntu as well as other distros. Type the following commands in apt-based distros to add both basic support and the Snap Store, which is virtually identical to the Ubuntu Software app, and only required
if you’ve dumped Ubuntu Software in favour of the Synaptic Package Manager:
$ sudo apt-get install snapd
$ sudo snap install snap-store
Snap isn’t the only alternative out there: another well-established distribution tool is Flatpak, which works in a similar way, right down to the sandboxed environment for apps. This does require installing – a simple enough task in later versions of Ubuntu, including 18.04:
$ sudo apt-get install flatpak
$ sudo apt install gnome-software-plugin-flatpak
The second command enables you to find and install Flatpak apps through Ubuntu Software. All that remains is to add the Flathub repo to Flatpak itself:
$ flatpak remote-add --if-not-exists flathub https:// flathub.org/repo/flathub.flatpakrepo
The package manager approach isn’t the only way you can find and install apps on your PC. Some apps are packaged for direct installation following a similar process to other operating systems. In the case of Ubuntu and other Debian-based distros, apps with a DEB extension can usually simply be installed by double-clicking the file, which will open it in Ubuntu
Software allowing you to install and remove it from there. Note, however, programs installed from DEB files aren’t updated automatically. To update manually, you’ll need to download the latest DEB file, then doubleclick that to overwrite the existing installation.
Appimage (https://appimage.org) apps are effectively portable apps designed to run directly from a single APPIMAGE file, no installation required. All you have to do is to make the file executable after downloading it; right-click the file and choose Properties > Permissions tab, then tick ‘Allow executing file as program’. Then simply double-click it to launch.
Finally, some packages come in the form of a downloadable zip file that – when extracted – reveal a folder and a SH script file. You’ll need to make the script file executable, then issue the following command in the Terminal from the directory where the SH resides, substituting scriptname.sh with the correct filename:
$ ./scriptname.sh
When it comes to critical updates – the type involving patching security holes and fixing bugs – you no longer need to worry about doing this manually. The
Ubuntu Software tool is designed to do all of this for you in the background; at intervals you’ll see it popping up with a prompt that updated software is available. You can install it now, get a reminder to do so later and – most importantly – click ‘Details of updates’ to get a full list of available updates, which are split into two categories: security and other. Select an item and expand ‘Technical description’ to get a list of changes.
While it’s not generally recommended, you can untick updates that you want to postpone installing for any reason. Click Settings to access the relevant tab in Software & Updates for configuring how the update tool works; daily checks and automatic installation of security updates are recommended, but you can limit other updates to appearing weekly or even monthly if you wish. We also recommend clicking ‘Sign in’ to
enable Canonical Livepatch, which can apply critical kernel patches without rebooting your PC.
You can also check for updates manually. There’s the Update section in Ubuntu Software of course, but we prefer Synaptic Package Manager’s approach: launch the app, click Reload followed by ‘Mark All Upgrades’. To review what’s being updated, click the Status button and choose ‘Installed (upgradable)’. Finally, click Apply to update the selected items. Alternatively, update from the Terminal – to update to the latest versions of all currently installed packages, use the following:
$ sudo apt-get update
$ sudo apt-get upgrade
If you’re willing to let the apt tool ‘intelligently’ update packages, which may lead to some being removed to allow others to be upgraded, use distupgrade in place of upgrade .