Skip to content

DNF System Update

Shell script to update an APT or DNF managed system



The script updates the system, removes unneeded packages, and clears the package manager cache. It also creates some simple aliases for easy script launching and system navigation.

The first run saves a copy of the script in the user's home directory, $HOME/scripts/prod, and attempts to create aliases in the .bash_aliases file if it does not exist, which it then sources. At the end, the script removes itself from the starting directory.



DOWNLOAD


SYNTAX

ℹ️ Alias is only available after the first execution.

  • APT
    • Alias: updateapt
$ ~/update_apt.sh


  • DNF
    • Alias: updatednf
$ ~/update_dnf.sh


REQUIREMENTS

  • The system must be managed by APT or DNF.


UTILIZATION

1. Download the script and save it on your system.

2. Give the script execution permission.

3. Run the script.


EXAMPLE

$ updatednf

    COMPLETE SYSTEM UPDATE
     USER ALIAS CREATION


********* ATENTION ***********
*THIS SCRIPT WILL UPDATE YOUR*
*     SYSTEM COMPLETELY.     *
*  IT MIGHT TAKE SOME TIME   *
******************************
DO YOU WISH TO CONTINUE? <y/n> >>