Skip to the content.

DNF Update Notifier

A lightweight Bash script to notify you of available DNF package updates at a specified interval on Fedora systems. It integrates with the desktop environment using notify-send and allows you to update packages directly via a terminal prompt.

Features

Notification Preview

Here’s how the desktop notifications look in different scenarios: when updates are available, when the system is up to date, and when an error occurs during the update check.

Updates available System up-to-date Error
Screenshot of DNF update notification (Available updates scenario) Screenshot of DNF update notification (Up-to-date scenario) Screenshot of DNF update notification (Error scenario)

Installation

  1. Clone the repository:

    $ git clone https://github.com/michielskobe/dnf-update-notifier.git
    $ cd dnf-update-notifier
    
  2. Move the script to the correct location and make it executable:

    $ mv dnf-update-notifier.sh /path/to/dnf-update-notifier.sh
    $ chmod +x /path/to/dnf-update-notifier.sh
    
  3. Add a cron job to run the script automatically:

    1. Open your user crontab:
      $ crontab -e
      
    2. Add the following line to run the script every minute: ```bash
              • /path/to/dnf-update-notifier.sh ```
    3. Save and exit the editor. The script will now run automatically at the specified interval.

    4. Verify that the cron job was added successfully:
      $ crontab -l
      

Customizations

Uninstall

  1. Remove the script:

    $ rm /path/to/dnf-update-notifier.sh
    
  2. Remove the cron job by editing your crontab and deleting the corresponding line:

    $ crontab -e