{"id":51663062,"url":"https://github.com/motorrin/arch-smart-update","last_synced_at":"2026-07-14T18:00:35.670Z","repository":{"id":341030242,"uuid":"1166596343","full_name":"motorrin/arch-smart-update","owner":"motorrin","description":"This script helps you decide when to update Arch Linux or its derivatives.","archived":false,"fork":false,"pushed_at":"2026-07-07T19:32:20.000Z","size":554,"stargazers_count":31,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-07T21:06:31.527Z","etag":null,"topics":["arch-linux","arch-maintenance","arch-update","bash","bash-script","bash-scripting","cachyos","endeavouros","eos-update","linux","linux-maintenance","linux-updates","paru","topgrade","yay"],"latest_commit_sha":null,"homepage":"https://aur.archlinux.org/packages/arch-smart-update","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":"LICENSE","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-07-07T19:31:20.000Z","dependencies_parsed_at":"2026-03-02T15:00:55.574Z","dependency_job_id":null,"html_url":"https://github.com/motorrin/arch-smart-update","commit_stats":null,"previous_names":["motorrin/endeavouros_smart_update_wrapper","motorrin/arch-smart-update"],"tags_count":77,"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":35472809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","arch-maintenance","arch-update","bash","bash-script","bash-scripting","cachyos","endeavouros","eos-update","linux","linux-maintenance","linux-updates","paru","topgrade","yay"],"created_at":"2026-07-14T18:00:19.617Z","updated_at":"2026-07-14T18:00:35.658Z","avatar_url":"https://github.com/motorrin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/a4c7914d-a5c0-4834-86a7-b05aacde33d4\" width=\"15%\" /\u003e\n\n![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\u003cbr\u003e\n\n**[Skip to Installation](#installation)**\n\n\u003c/div\u003e\n\n**arch-smart-update** is a bash wrapper designed to safeguard system updates on vanilla **Arch Linux** and its derivatives. Instead of updating blindly, it gives you complete control over the upgrade process by presenting **package build dates**, **package descriptions**, official **Arch news** alerts, and stability recommendations from an intelligent **Update Advisor** — enabling you to make an informed decision before delegating the actual transactions directly to **pacman**, an **AUR helper**, or **topgrade**.\n\nThe script also supports distribution-specific utilities on **EndeavourOS** (such as `eos-update`) and **CachyOS** (such as `arch-update`), while remaining fully compatible with any other Arch-based system.\n\n⚠️ **IMPORTANT DISCLAIMER:** The update recommendations provided by the Advisor are helpful guidelines, not absolute rules. As an Arch Linux user, **you are the system administrator** and hold ultimate responsibility for your machine. Always review the update list and use your own judgment before pressing \"Y\". The author is not responsible for any broken systems, unbootable kernels, or data loss!\n\n---\n\n![01](https://github.com/user-attachments/assets/6e7902f7-1f66-40b8-89ed-e036a1def653)\n![02](https://github.com/user-attachments/assets/bd4fb48c-20cc-4f84-886f-4685b1a0a9fc)\n\n---\n\n## Daemon preview (optional, can be activated on first launch)\n\n![03](https://github.com/user-attachments/assets/a4c8fbbb-3195-4ece-9bab-d82b6e56fea4)\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.zst` backup (using fast Zstandard compression) 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 checks if a package manager is actually running. It uses `fuser` if available, or natively extracts the lock PID and scans the process table (`pgrep` / `/proc`) as a fallback to safely remove phantom locks.\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- **🧹 Automated System Cleanup:** Optional post-update cleanup that safely removes orphaned packages, clears partial downloads, empties the pacman/AUR cache, vacuums the systemd journal (keeping 100M), and clears user thumbnail caches.\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- **👻 Background Daemon \u0026 Notifications:** You can allow the script to run in the background using a user systemd timer. It silently checks for updates using `fakeroot` (no sudo required) and sends interactive desktop notifications via `libnotify`. Features a smart 3-notification limit for Arch News to prevent spam.\n- **🎛️ Unified Configuration Management:** All custom commands, mirror overrides, behavior settings, and user package arrays are securely parsed from a single `settings.conf` file. Your personal settings are isolated from upstream defaults and will never be overwritten during script updates.\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 settings.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/`, downloads the latest default templates from GitHub, and helps you set up standard features. Whenever you launch the script manually, it will display the exact path to your active configuration file at the very top.\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- `settings.conf` — Your master configuration file. Here you can configure:\n  - **General Settings:** `PROMPT_MIRROR_REFRESH`, `MAX_BACKUP_COPIES`, `AUR_HELPER_OVERRIDE`, `ENABLE_POST_CLEANUP`.\n  - **Daemon \u0026 Logging:** Configure `ENABLE_BACKGROUND_CHECK`, systemd timer intervals, and `GENERATE_LOGS`.\n  - **Overrides:** Define a `CUSTOM_REFLECTOR_CMD` or define `CUSTOM_CMDS` (e.g., `flatpak update -y`) to run instead of the standard utilities.\n  - **User Packages:** Add your own apps to the arrays (e.g., `USER_CRITICAL_PKGS=(\"my-important-app\")`) to integrate them into the Advisor's threat levels.\n\nWhenever the master configuration on GitHub is updated, the script will quietly pull the changes without touching your custom files. If new features or options are introduced to `settings.default.conf` that are missing in your active `settings.conf`, the script will display a notice. You can safely merge and align your active configuration to adopt these new options (while fully preserving all your custom settings, user packages, and custom update commands) by running the script with the --reconfigure flag.\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 zstd util-linux`\n\n*(Note: The python package provides python3 for the Arch News RSS check, zstd is required for accelerated local database backups, and util-linux provides the script utility used for interactive terminal emulation).*\n\n**Optional Dependencies:**\n- `base-devel` (specifically `fakeroot`) — Required for the background daemon to sync databases without sudo privileges.\n- `libnotify` — Required for desktop notifications in daemon mode.\n- `psmisc` — Provides the `fuser` utility for standard lock file analysis (though the script features a native fallback if missing).\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\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 choose to install the script manually, keep in mind that you will also have to manually download new versions to ensure stability:\n\n1. `cd ~`  \n2. `curl -O https://raw.githubusercontent.com/motorrin/arch-smart-update/main/arch-smart-update.sh`  \n3. `chmod +x arch-smart-update.sh`\n\n## ❓ How do I use this script?\n\nIf you installed via AUR, the command is globally available as:  \n`arch-smart-update`\n\nIf you installed Manually, the command is:  \n`~/arch-smart-update.sh`\n\n## ⌨️ Why write so many letters? Create an alias!\n\n### 1. Check which shell you are using:\n`echo $SHELL`\n\n### 2. Open your configuration file:\nFor bash:  \n`nano ~/.bashrc`  \nFor zsh:  \n`nano ~/.zshrc`  \nFor fish:  \n`nano ~/.config/fish/config.fish`\n\n### 3. Add the alias to the very end of the file:\n\nIf you installed via AUR:  \n`alias up=\"arch-smart-update\"`\n\nIf you installed Manually:  \n`alias up=\"$HOME/arch-smart-update.sh\"`\n\n### 4. Apply the changes immediately:\n\nFor bash:  \n`source ~/.bashrc`  \nFor zsh:  \n`source ~/.zshrc`  \nFor fish:  \n`source ~/.config/fish/config.fish`\n\n## 🗑️ Uninstalling the script\n\n### 1. Make sure the background process is not running:\n\n`systemctl --user disable --now arch-smart-update.timer`\n\n### 2. Remove the script (run one depending on your installation method):\n\nAUR:  \n`sudo pacman -Rns arch-smart-update`\n\nManual *(if you downloaded it to a different folder, change the path accordingly)*:  \n`rm ~/arch-smart-update.sh`\n\n### 3. Remove configuration files, logs, news cache, and icon:\n\n`rm -rf ~/.config/arch-smart-update`\n\n### 4. Remove generated systemd files:\n\n`rm -f ~/.config/systemd/user/arch-smart-update.service`  \n`rm -f ~/.config/systemd/user/arch-smart-update.timer`  \n`systemctl --user daemon-reload`\n\n### 5. Delete Pacman database backups:\n\n`sudo rm -f /var/lib/pacman/backup/pacman_database_*.tar.zst`\n`sudo rm -f /var/lib/pacman/backup/pacman_database_*.tar.gz`\n\n### 6. Clear AUR helper build cache (if installed via AUR):\n\n`rm -rf ~/.cache/yay/arch-smart-update`\n\n`rm -rf ~/.cache/paru/clone/arch-smart-update`\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"}