A stylized and powerful Bash function to fully update and clean your Arch Linux or Arch-based distribution (like Manjaro, EndeavourOS, Garuda, etc.) — including pacman, AUR, Flatpak, and Snap support — all in one command.
- 🔄 Sync and upgrade official packages using
pacman
- 🧩 Update AUR packages via
yay
- 🧹 Identify and remove orphaned packages
- 🧼 Clean package cache to free up space
- 📦 Update Snap and Flatpak packages (if installed)
- ✅ Styled output with clear steps and status
- 🧠 Sudo elevation at the start, so you're not prompted repeatedly
Package Manager | Description | Required? |
---|---|---|
pacman |
Core Arch package manager | ✅ Yes |
yay |
AUR helper | ✅ Yes |
snap |
Canonical's Snap system | |
flatpak |
Flatpak apps |
🔥 SYSTEM UPGRADE INITIATED
🕒 Started at: Tue Jul 9 17:00:00 IST 2025
[1/7] 🔄 Updating system packages (pacman)...
[2/7] 🧩 Updating AUR packages (yay)...
[3/7] 🧹 Checking for Orphaned Packages...
[4/7] 🧼 Cleaning Package Cache...
[5/7] 📦 Refreshing Snap Packages...
[6/7] 📦 Updating Flatpak Packages...
[7/7] ✅ Final Status Check...
✅ SYSTEM STATUS: ABSOLUTE PERFECTION ACHIEVED
💡 All Done Lord Vader. The Death Star is clean and updated.
- Open your terminal.
- Edit your shell configuration file:
nano ~/.zshrc # for Zsh users
# or
nano ~/.bashrc # for Bash users
- Paste the
update()
function from this script into the file. - Save and reload your shell:
source ~/.zshrc # or ~/.bashrc
- Now run:
update
- Arch-based distro (e.g., Arch, Manjaro, EndeavourOS)
yay
installed (sudo pacman -S yay
)- Optional:
flatpak
andsnapd
if you want those package types supported
- Filename:
arch-update-function.zsh
(or.sh
) - Function name:
update
- Tested on: Arch Linux, Manjaro, EndeavourOS
MIT License — free to use, modify, or share.# 🔧 Arch Linux System Update Script
A stylized and powerful Bash function to fully update and clean your Arch Linux or Arch-based distribution (like Manjaro, EndeavourOS, Garuda, etc.) — including pacman, AUR, Flatpak, and Snap support — all in one command.
- 🔄 Sync and upgrade official packages using
pacman
- 🧩 Update AUR packages via
yay
- 🧹 Identify and remove orphaned packages
- 🧼 Clean package cache to free up space
- 📦 Update Snap and Flatpak packages (if installed)
- ✅ Styled output with clear steps and status
- 🧠 Sudo elevation at the start, so you're not prompted repeatedly
Package Manager | Description | Required? |
---|---|---|
pacman |
Core Arch package manager | ✅ Yes |
yay |
AUR helper | ✅ Yes |
snap |
Canonical's Snap system | |
flatpak |
Flatpak apps |
🔥 SYSTEM UPGRADE INITIATED
🕒 Started at: Tue Jul 9 17:00:00 IST 2025
[1/7] 🔄 Updating system packages (pacman)...
[2/7] 🧩 Updating AUR packages (yay)...
[3/7] 🧹 Checking for Orphaned Packages...
[4/7] 🧼 Cleaning Package Cache...
[5/7] 📦 Refreshing Snap Packages...
[6/7] 📦 Updating Flatpak Packages...
[7/7] ✅ Final Status Check...
✅ SYSTEM STATUS: ABSOLUTE PERFECTION ACHIEVED
💡 All Done Lord Vader. The Death Star is clean and updated.
- Open your terminal.
- Edit your shell configuration file:
nano ~/.zshrc # for Zsh users
# or
nano ~/.bashrc # for Bash users
- Paste the
update()
function from this script into the file. - Save and reload your shell:
source ~/.zshrc # or ~/.bashrc
- Now run:
update
- Arch-based distro (e.g., Arch, Manjaro, EndeavourOS)
yay
installed (sudo pacman -S yay
)- Optional:
flatpak
andsnapd
if you want those package types supported
- Filename:
arch-update-function.zsh
(or.sh
) - Function name:
update
- Tested on: Arch Linux, Manjaro, EndeavourOS
MIT License — free to use, modify, or share.