An open API service indexing awesome lists of open source software.

https://github.com/bocaletto-luca/sys-report

sys-report Linux maintenance.sh is a zero-dependency Bash script that performs a full suite of system-maintenance tasks on Debian and its derivatives. All actions are logged to /var/log/maintenance-YYYYMMDD-HHMMSS.log. By Bocaletto Luca
https://github.com/bocaletto-luca/sys-report

bash bash-script bocaletto-luca linux opensource script sys-report

Last synced: 6 months ago
JSON representation

sys-report Linux maintenance.sh is a zero-dependency Bash script that performs a full suite of system-maintenance tasks on Debian and its derivatives. All actions are logged to /var/log/maintenance-YYYYMMDD-HHMMSS.log. By Bocaletto Luca

Awesome Lists containing this project

README

          

# maintenance.sh
#### Author: Bocaletto Luca

> **Comprehensive System Maintenance Tool for Debian & Ubuntu**



Version 2.0


MIT License

---

## đź“‹ Description

`maintenance.sh` is a zero-dependency Bash script that performs a full suite of system-maintenance tasks on Debian and its derivatives.
All actions are logged to `/var/log/maintenance-YYYYMMDD-HHMMSS.log`.

**Features**
- Refresh package lists (`--update`)
- Install available upgrades (`--upgrade`)
- Perform distribution upgrades (`--dist-upgrade` / `--full-upgrade`)
- Remove unused packages (`--autoremove`)
- Clean cached `.deb` files (`--autoclean`)
- Verify package integrity (`--check`)
- Report reboot requirement (`--reboot-check`)
- “All-in-one” mode (`--all`)
- Colorized output & timestamped logging
- Final reboot prompt if required

---

## ⚙️ Prerequisites

- Debian, Ubuntu, Mint or any APT-based distribution
- Bash (v4+)
- No external packages or libraries—uses only coreutils, `apt-get`, `tput`, `tee`, `curl`, `date`

---

## 🚀 Installation

#### bash
# Clone this repository
git clone https://github.com/bocaletto-luca/maintenance.sh.git
cd maintenance.sh

# Make the script executable
chmod +x maintenance.sh

# (Optional) Move to a system PATH location
sudo mv maintenance.sh /usr/local/bin/maintenance.sh

## 🛠️ Usage

#### Run the script with sudo and any combination of options:

sudo ./maintenance.sh [OPTIONS]

## Example:

# Update package lists only
sudo ./maintenance.sh --update

#### Full maintenance run
sudo ./maintenance.sh --all

#### Custom sequence: update + autoremove
sudo ./maintenance.sh --update --autoremove

## đź“‚ Log Files

#### Logs are stored under:
/var/log/maintenance-YYYYMMDD-HHMMSS.log

## Review or archive these files for auditing.

## 👤 Author

### Bocaletto Luca Full-Stack Developer & Linux Enthusiast

## đź“„ License

#### This project is released under the GPL License. Fell free to use, modify, and distribute!