Ways to Uninstall and Install anacron Ubuntu 22.04

Updated: September 5, 2022

Anacron (like “anac(h)ronistic”) is a periodic command scheduler. It executes commands at intervals specified in days. Unlike cron, it does not assume that the system is running continuously. It can therefore be used to control the execution of daily, weekly, and monthly jobs (or anything with a period of n days), on systems that don’t run 24 hours a day. When installed and configured properly, Anacron will make sure that the commands are run at the specified intervals as closely as machine uptime permits. I will show you how to install anacron on Ubuntu 22.04 in this guide.

Prerequisites to install

  • Operating system: Ubuntu 22.04 or older versions with more than 2GB RAM
  • Privileges: Check that you can run sudo commands.

Prerequisites to install anacron on Ubuntu 22.04

Install anacron Ubuntu 22.04

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

Install anacron using APT

This is one of the popular ways to install any Ubuntu packages because it is simple to understand, even if you are a Linux novice. Following these instructions to get anacron on your Ubuntu.

Step 1: Update the APT database to download new packages from Ubuntu. Launch the terminal and enter the following Linux command:

sudo apt -y update

Step 2: Install the package on Ubuntu 22.04. After updating the system, you can install anacron Ubuntu by executing this command in the terminal.

sudo apt-get -y install anacron

Install anacron using Aptitude

Users can manage their installation, upgrade, and removal of packages with Aptitude and view a list of the packages that are currently available. You must run this command to install it if you haven’t already done so on Ubuntu.

sudo apt-get -y install aptitude

After that, you can now install anacron 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. Update the APT database to fetch new packages from Ubuntu. Launch the terminal and enter the following Linux command:

sudo apt -y update

Step 2: Start the package installation on Ubuntu 22.04. After updating, you can install anacron Ubuntu by executing this command in the terminal.

sudo aptitude -y install anacron

Uninstall anacron on Ubuntu 22.04

Have you ever thought that uninstalling an application from Ubuntu is difficult? You are mistaken; Anyone can easily uninstall any program, not just anacron.

If you installed anacron using APT or Aptitude, you could uninstall anacron on Ubuntu by following this step:

sudo apt remove --auto-remove anacron

To uninstall anacron and remove its data and dependencies, you can also use the following command:

sudo apt autoremove --purge anacron

Conclusion

In this tutorial, I showed you ways to install anacron on Ubuntu 22.04 and ways to uninstall anacron too. Please do not hesitate to contact me if you require assistance. I’m delighted to respond.