{"id":46170301,"url":"https://github.com/motorrin/arch_smart_update","last_synced_at":"2026-03-17T23:20:41.200Z","repository":{"id":341030242,"uuid":"1166596343","full_name":"motorrin/Arch_Smart_Update","owner":"motorrin","description":"Not sure when to update your Arch Linux? This script will help you decide!","archived":false,"fork":false,"pushed_at":"2026-03-01T16:49:34.000Z","size":115,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-01T18:55:32.962Z","etag":null,"topics":["arch-linux","bash-script","endeavouros","linux-updates","pacman","system-maintenance","yay"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/motorrin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-25T11:50:41.000Z","updated_at":"2026-03-01T16:50:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/motorrin/Arch_Smart_Update","commit_stats":null,"previous_names":["motorrin/endeavouros_smart_update_wrapper"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/motorrin/Arch_Smart_Update","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motorrin%2FArch_Smart_Update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motorrin%2FArch_Smart_Update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motorrin%2FArch_Smart_Update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motorrin%2FArch_Smart_Update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/motorrin","download_url":"https://codeload.github.com/motorrin/Arch_Smart_Update/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motorrin%2FArch_Smart_Update/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30007043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T14:08:50.421Z","status":"ssl_error","status_checked_at":"2026-03-02T14:08:50.037Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arch-linux","bash-script","endeavouros","linux-updates","pacman","system-maintenance","yay"],"created_at":"2026-03-02T15:00:26.079Z","updated_at":"2026-03-02T15:00:37.180Z","avatar_url":"https://github.com/motorrin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Bash](https://img.shields.io/badge/Language-Bash-4EAA25?style=for-the-badge\u0026logo=gnu-bash)\n![CachyOS](https://img.shields.io/badge/OS-CachyOS-008B8B?style=for-the-badge\u0026logo=linux\u0026logoColor=white)\n![EndeavourOS](https://img.shields.io/badge/OS-EndeavourOS-7F3F98?style=for-the-badge\u0026logo=endeavouros\u0026logoColor=white)\n![Arch Linux](https://img.shields.io/badge/OS-Arch_Linux-1793D1?style=for-the-badge\u0026logo=arch-linux)\n![License](https://img.shields.io/badge/License-MIT-blue?style=for-the-badge)\n\n**Tired of blindly running `pacman -Syu` and crossing your fingers that your system doesn't break?**\n\n\u003c/div\u003e\n\n**Arch_Smart_Update** is an advanced, ultra-safe, and visually stunning bash script for managing system updates on vanilla **Arch Linux** and its derivatives (has better integration with **EndeavourOS** and **CachyOS** packages and tools, **but works great on other Arch-based distributions as well**). It acts as an intelligent shield for your package manager: analyzing pending updates, checking official news, automating backups, and utilizing a built-in **Advisor** to protect your machine from Day-1 bugs, broken dependencies, and kernel panics.\n\n---\n\n![01](https://github.com/user-attachments/assets/9aab8143-8587-4c49-b822-915f9a1d950e)\n![02](https://github.com/user-attachments/assets/bed32c77-38d2-4a8f-a017-35fc3099d786)\n\n---\n\n## ✨ Why You Need This Script (Key Features)\n\n- **⚡ Safe RAM-Based Sync (`/tmp`):** The script never touches your live local pacman database during the checking phase. All database syncing and calculations are done in an isolated temporary directory in your RAM (`/tmp/checkupdates-db...`). This 100% prevents catastrophic \"partial upgrade\" scenarios if you decide to cancel the update.\n- **🧠 Smart Update Advisor:** Automatically analyzes the criticality of pending packages. If a system-crashing update (like the Linux kernel, `glibc`, or NVIDIA drivers) was released less than 24 hours ago, the script strongly advises you to wait, ensuring upstream stability before you apply it.\n- **📰 Arch News Integration (RSS):** Fetches the latest official Arch Linux news feed. If there’s a recent post requiring manual intervention, you'll get a bright warning before you press \"Y\".\n- **🛡️ Automated Pacman DB Backups:** Automatically creates a `.tar.gz` backup of your `/var/lib/pacman/local` database before applying any changes. It keeps the last 5 copies so you can always roll back seamlessly.\n- **🚀 Smart Mirror Management:** Monitors your mirrorlist age and sync speeds. If mirrors are older than 7 days or time out, it detects the instability and offers to automatically refresh them via `reflector`, `eos-rankmirrors`, or `cachyos-rate-mirrors`.\n- **📊 Rich CLI Analytics:** Displays a beautifully formatted, color-coded terminal table showing update types (MAJOR, MINOR, PATCH, CALVER, EPOCH), package age in hours, download sizes, repositories, and descriptions.\n- **🔒 Intelligent Lock File Removal:** Detects a stale `/var/lib/pacman/db.lck` file and uses `fuser` to check if a package manager is actually running. If it's a phantom lock, the script safely removes it for you.\n- **🚨 IgnorePkg Conflict Checker:** If you have frozen packages via `pacman.conf`, the script simulates the update in the background and warns you of any dependency breakages caused by skipped packages.\n- **🧩 Seamless Ecosystem Integration:** Full, native support for AUR helpers (`yay`, `paru`), as well as synergy with `eos-update` and `topgrade` to handle your Flatpaks, firmwares, and dotfiles.\n- **🎛️ Smart Configuration Management:** The script separates upstream default configurations from your personal overrides. Your custom commands, mirror settings, and specific critical packages are stored safely in ~/.config/arch-smart-update/ and will never be overwritten when the script updates its internal package lists from GitHub.\n\n---\n\n## ⚙️ Package Categorization \u0026 Threat Levels\n\nThe script recognizes hundreds of packages (from DEs to base system components) and categorizes them into four threat levels, calculating a safe \"cooldown\" period:\n\n- **☢️ NUKE (System Core):** `glibc`, `linux`, `nvidia`, `systemd`, `grub`, `cryptsetup`.\n  \u003e *Recommendation:* Wait **24 hours**.\n- **❗ CRIT \u0026 DEs (Crucial Services \u0026 Desktop Environments):** `mesa`, `wayland`, `dbus`, `KDE Plasma`, `GNOME`, `Hyprland`, etc.\n  \u003e *Recommendation:* Wait **12 hours**.\n- **⭐ FEAT (General Features \u0026 Utilities):** Audio/Network stacks, Frameworks, EOS apps.\n  \u003e *Recommendation:* Wait **6 hours**.\n- **📦 Standard Packages \u0026 AUR:**\n  \u003e *Recommendation:* Wait **3 hours**.\n- **💡 Customizing the lists:** You don't have to wait for an update to add your specific apps to these categories! You can easily append your own packages to the NUKE, CRIT, or FEAT lists using the user_packages.conf file, and your changes will survive all future script updates.\n\n---\n\n## 📁 Configuration \u0026 Customization\n\nOn its first run, the script creates a configuration folder at `~/.config/arch-smart-update/` and downloads the latest default templates from GitHub. \n\nTo ensure your personal settings are never overwritten by script updates, the configuration is split into two types:\n\n**1. Developer Managed (Auto-updating via GitHub):**\n- `packages.conf` — The master list of categorized packages.\n- `*.default.conf` — Templates showing the latest recommended syntax.\n\n**2. User Managed (Safe from overwrites):**\n- `user_packages.conf` — Add your own packages to the threat levels here. For example: `CRITICAL_PKGS+=(\"my-important-app\")`.\n- `custom_commands.conf` — Define custom update commands (e.g., `flatpak update -y`). If populated, the script will run these *instead* of standard pacman/topgrade utilities.\n- `reflector.conf` — Your custom `reflector` command for generating mirrorlists.\n- `other_settings.conf` — General script behavior settings. Here you can configure:\n  \u003e `PROMPT_MIRROR_REFRESH` (Set to `true` to always ask for a mirror refresh before checking updates).\n  \u003e `MAX_BACKUP_COPIES` (Adjust how many Pacman DB `.tar.gz` backups are kept, default is 5).\n  \u003e `AUR_HELPER_OVERRIDE` (Force the script to use a specific AUR helper like `pikaur` or `paru` instead of auto-detecting).\n\nWhenever the master configuration on GitHub is updated, the script will quietly pull the changes without touching your custom files!\n\n\n## 📋 Dependencies\n\nThe script relies on standard system utilities, but make sure you have the following packages installed:\n\n`sudo pacman -S curl python bash tar gawk coreutils psmisc`\n\n*(Note: The `python` package provides `python3` for the Arch News RSS check, and `psmisc` provides the `fuser` command required for smart lock file management).*\n\n## 🛠️ Installation\n\n## Option 1: Install from AUR (Recommended)\nThe script is officially available in the Arch User Repository. You can install it using your favorite AUR helper:\n\nFor yay:  \n`yay -S arch-smart-update`  \nFor paru:  \n`paru -S arch-smart-update`\n\n## Option 2: Manual Installation\nIf you prefer not to use the AUR, you can install the script manually:\n\n`curl -O https://raw.githubusercontent.com/motorrin/Arch_Smart_Update/main/arch-smart-update`  \n`chmod +x arch-smart-update`  \n`mv arch-smart-update ~/arch-smart-update`  \n\n\n## ❓ How do I use this script?\nIf you installed via AUR, the command is globally available as:  \n`arch-smart-update`  \nIf you installed Manually, the command is:  \n`~/arch-smart-update`\n\n## Why write so many letters? Create an alias!\n\n### 1. Check if you're using bash or zsh:\n`echo $0`\n\n### 2. Open your configuration file:\nFor bash:  \n`nano ~/.bashrc`  \nFor zsh:  \n`nano ~/.zshrc`\n\n### 3. Add the alias to the very end of the file:\nIf you installed via AUR:  \n`alias up=\"arch-smart-update\"`  \nIf you installed Manually:  \n`alias up=\"~/arch-smart-update\"`\n\n### 4. Apply the changes immediately:\nFor bash:  \n`source ~/.bashrc`  \nFor zsh:  \n`source ~/.zshrc`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmotorrin%2Farch_smart_update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmotorrin%2Farch_smart_update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmotorrin%2Farch_smart_update/lists"}