Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.33 KB

File metadata and controls

50 lines (38 loc) · 1.33 KB

auto-update-script

This script automatically updates Debian-based distros. Also includes server updating script.

Instructions

To execute this script, run the following commands as root:

chmod +x update.sh / update-server.sh
./SCRIPT

Features

  • Automatically reconfigures dpkg if anything is wrong.
  • Updates and upgrades the system.
  • Performs apt install -f to fix broken dependencies.
  • Runs apt autoclean and apt autoremove to clean up unnecessary packages and downloaded files.
  • Updates Flatpak packages (comment the relevant line to disable this).

This is a simple script for Debian-based distros. It includes auto-reboot features, which you can enable by editing out the comments.

Automation:

1. Create a .desktop File for the Shortcut:

nano /home/$NAME/Desktop/UpdateSystem.desktop

2. Add the following content:

[Desktop Entry]
Name=Update System
Comment=Update and upgrade the system with root privileges
Exec=pkexec bash /home/$USER/update.sh
Icon=system-software-update
Terminal=true
Type=Application
Categories=Utility;System;
  • pkexec prompts for an admin password.
  • Terminal=true keeps the terminal open to view progress.

3. Make the Shortcut Executable

chmod +x /home/$NAME/Desktop/UpdateSystem.desktop

PS. Closes the window once all updates/upgrades are done.