Ways to Install or Uninstall watchdog on Ubuntu 22.04

Updated: September 9, 2022

The watchdog program writes to /dev/watchdog every ten seconds. If the device is opened but not written to within a minute, the machine will reboot. This feature is available when the kernel is built with “software watchdog” support (standard in Debian kernels) or if the machine is equipped with a hardware watchdog (in which case this package can also be used to “pet” it, resetting its timer). In this guide, I will show you how to install watchdog on Ubuntu 22.04.


  • OS: Ubuntu 22.04 is needed for watchdog to work
  • Privileges: Check that you can run sudo commands.

Prerequisites to install watchdog on Ubuntu 22.04

Install watchdog Ubuntu 22.04

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

Install watchdog 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 watchdog on your Ubuntu.

Step 1: Obtain new packages from Ubuntu by updating the APT database. Launching the terminal and entering the following Linux command:

sudo apt-get update

Step 2: Start installing the packages on Ubuntu 22.04. After updating, you can install watchdog Ubuntu by executing this command in the terminal.

sudo apt-get -y install watchdog

Install watchdog using Aptitude

Aptitude allows users to view a list of available packages and manage package installation, upgrade, and removal. If you haven’t already done so, run this command to install it.

sudo apt-get -y install aptitude

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

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. Launch the terminal and enter the following Linux command:

sudo apt-get -y update

Step 2: Install the package on Ubuntu 22.04. After updating the system, you can install watchdog Ubuntu by pasting this command into the terminal and executing it.

sudo aptitude install watchdog

Uninstall watchdog on Ubuntu 22.04

Have you ever considered how difficult it is to uninstall an application from Ubuntu? You are mistaken; anyone, not just package administrators, can easily uninstall any program.

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

sudo apt remove --auto-remove watchdog

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

sudo apt autoremove --purge watchdog


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