Software for GNU/Linux is usually in a “packaged” format; packages are compressed software archives of the files that provide application functionality. The default package file format in Ubuntu is a Deb (Debian) file, usually with a .deb extension. You may use the low-level package tool dpkg to install a Deb file.
Install a Deb filesudo dpkg -i example.deb
Remove a Deb file with dpkg (removes only the package)sudo dpkg -r example.deb
Purge a Deb (removes the package, it’s dependencies and configuration files)sudo dpkg -P example.deb
A Deb file often has dependencies – it depends on shared libraries and / or other software to function. However, dpkg doesn’t automatically download and install those. You may use the high-level package tool apt-get for that.
After installing a Deb file with dpkg, resolve dependency issues with apt-getapt-get install -f
APT, the Advanced Packaging Tool, is the main command-line tool for working with dpkg. APT is a package manager, ensuring the proper dependencies are present and managing the download, installation and removal of packages. The older, all-encompassing apt-get and the newer, bundled, most common apt commands are below.
Some of the most common apt-get commands:
Synchronize your local copy of the package repository databasesudo apt-get update
Install a single software packagesudo apt-get install example-package
Install a multiple software packagessudo apt-get install example-package-1 example-package-2
Upgrade a single software packagesudo apt-get upgrade example-package
Upgrade all packagessudo apt-get upgrade
Upgrade all packages and remove unused dependenciessudo apt-get dist-upgrade
Remove a single software packagesudo apt-get remove example-package
Remove multiple software packagessudo apt-get remove example-package-1 example-package-2
Purge a package (remove a package, it’s dependencies and configuration files)sudo apt-get purge example-package
Automatically remove all unused packages, libraries and configuration filessudo apt-get autoremove
Some of the most common apt commands:
Synchronize your local copy of the package repository databasesudo apt update
Install a single software packagesudo apt install example-package
Install a multiple software packagessudo apt install example-package-1 example-package-2
Upgrade all packagessudo apt upgrade
Upgrade all packages and remove unused dependenciessudo apt full-upgrade
Remove a single software packagesudo apt remove example-package
Remove multiple software packagessudo apt remove example-package-1 example-package-2
Purge a package (remove a package, it’s dependencies and configuration files)sudo apt purge example-package
Automatically remove all unused packages, libraries and configuration filessudo apt autoremove
Flatpak is an almost universal packaging framework for desktop applications that can be installed and run in many different Linux distributions. Flatpaks have their own runtime environment with all the dependencies they need inside. Flatpaks also provide an extra layer of security – they are sandboxed – insulated from the core system (and do not require root privileges to install or remove). However, precisely because of the advantages listed above; Flatpaks are often larger, start slower and may not match your theme.
Flathub is the main Flatpak repository
Install a Flatpak from Flathubflatpak install flathub example.package
To install a flatpak from another repositoryflatpak install other-repo example.package
Install a flatpak using a .flatpakref fileflatpak install path/to/*.flatpakref
Reboot to see the app in the menu, or run it from a Terminal right awayflatpak run com.example.package
To search for a flatpak packageflatpak search example.package
List flatpaks already on your computerflatpak list
To uninstall a flatpakflatpak uninstall example.package
Delete the settings and cacheflatpak uninstall --delete-data
And clean up any unused packages and runtimesflatpak uninstall --unused
Software (see below) features a Flathub plug-in
Software is an all-in-one package “store” that features a slick graphical user interface. Browse software organized in categories. Search, install and uninstall software as well as update the system. The Software center included with C4C Ubuntu is GNOME Software – which by default offers up Debian (Deb) packages that it refers to as Ubuntu files. We’ve also included the Flathub plug-in, so Flatpaks are categorized and managed in Software too. The animation below highlights several Christian oriented Debs and Flatpacks – as well as demonstrating how easy it is to incorporate Snaps (instructions below).
Snap is another packaging format containing all the dependencies needed to run. Snaps also allow users to “fallback” to previous versions and (like Flatpak), they are sandboxed. Snaps are disabled in C4C Ubuntu because the amount of space the Snap ecosystem requires combined with the larger file size of the Snap versions of Firefox and Thunderbird made it impossible for us to fit Snap in our ISO.
If you want or need Snaps in your computer:
Remove the Snap “blocker”sudo rm /etc/apt/preferences.d/nosnap
Update and upgrade the systemsudo apt update && sudo apt upgrade
Install the GNOME Software Snap pluginsudo apt install gnome-software-plugin-snap
Synaptic Package Manager is a GUI front-end for APT, making it easy to search for, install, upgrade and downgrade almost 30,000 software packages. Like Software, you can use it to update the system too. You can also use Synaptic to remove, reinstall and / or fix broken packages.
Go to Menu > System > Synaptic Package Manager.
Provide your password / passphrase and click [Authenticate]
Click the [Reload] button to synchronize your local copy of the package repository database
Click the [Search] button
For this example, we’ll search the keyword Church
9 packages are found and Lyricue is projection software our church could use
We click the check box for Lyricue and choose Mark for Installation
Synaptic lists the dependencies. We click the [Mark] button.
Click [Apply]
Synaptic shows us exactly what will happen (click the triangle next to To be installed for more detail). Click the [Apply] button.
Synaptic shows each package and process (click the triangle next to Details for more detail)
Lyricue (and any other installed package) shows the check box in Synaptic now filled in green
Lyricue in the menu
More Info | Another almost distro-agnostic package format is APPIMAGE – see AppImage.org, appimage.github.io and What is AppImage? on Make Use Of. APT See How to use apt Package Manager on Ubuntu Command Line on VITUX and How to use APT to manage packages on Ubuntu? on Techtown. APT-GET Check out Linux apt-get command on ComputerHope and Using apt-get Commands In Linux [Complete Beginners Guide] on It’s FOSS. DPKG Read the Beginners guide to dpkg Linux command on LinuxConfig and dpkg Command in Linux With Examples on phoenixNAP. FLATPAK see Flatpak.org, Flatpak :: Fedora Docs and Flatpack on Linux: What Is It and How to Install Apps with It on Linuxiac. SNAP see A Comprehensive Guide to Using Snap Packages on Ubuntu on phoenixNAP and see the Snapcraft app store. SOFTWARE Check out Software and the Software Project Homepage on GNOME.org SYNAPTIC see the Synaptic homepage, the SynapticHowTo on the Ubuntu Community Help Wiki and Using the Lightweight Apt Package Manager Synaptic… on It’s FOSS.