How to Uninstall and Install fortunes on Ubuntu 22.04

Updated: August 20, 2022

The fortune program displays epigrams, known as fortune cookies, selected randomly from a selection of fortune files. In this tutorial, I will show you ways to install fortunes Ubuntu 22.04.

Requirements to install

  • Operating system: Ubuntu 22.04 or older Ubuntu versions
  • Privileges: Verify that you can execute the sudo commands line.

Prerequisites to install fortunes on Ubuntu 22.04

Install fortunes Ubuntu 22.04

fortunes is one of the popular ways on Ubuntu now so that this tutorial will show you how to install it in various ways. Choose the one you believe is simple and easy to follow.

Install fortunes using APT

This is a popular method for installing Ubuntu packages since it’s simple to understand, even if you’re new to Linux. Following these instructions to install fortunes on your Ubuntu 22.04.

Step 1: You must update the APT package repository cache before attempting to install, update, or remove any packages. Update the APT database to fetch new packages from Ubuntu. Launching the terminal and entering the following Linux command:

sudo apt-get -y update

Step 2: Start the package installation on Ubuntu 22.04. After updating the system, you can install fortunes Ubuntu by pasting this command into the terminal and pressing Enter.

sudo apt install fortunes

Install fortunes using Aptitude

You must run this command to install Aptitude if you haven’t already done so on Ubuntu.

sudo apt install aptitude

After that, you can now install fortunes by following these steps:

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Obtain new packages from Ubuntu by updating the APT database. Opening the terminal and executing this Linux command:

sudo apt-get -y update

Step 2: Install the package on Ubuntu 22.04. You can now install fortunes Ubuntu by executing this command in the terminal.

sudo aptitude -y install fortunes

Uninstall fortunes on Ubuntu 22.04

Have you ever thought that uninstalling an application from Ubuntu might be challenging? You’re wrong; any program, not just a fortunes, can be easily uninstalled by anyone.

This command can be used to uninstall fortunes from Ubuntu 22.04 if it was installed using APT or Aptitude.

sudo apt remove --auto-remove fortunes

You can also execute this command if you want to uninstall fortunes and remove its data and dependencies:

sudo apt autoremove --purge fortunes


In this tutorial, I showed you ways to install fortunes on Ubuntu 22.04 and ways to uninstall fortunes too. If you need any help, don’t hesitate to contact me. I’m very glad to answer them.