惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
罗磊的独立博客
小众软件
小众软件
T
Tailwind CSS Blog
宝玉的分享
宝玉的分享
博客园_首页
N
Netflix TechBlog - Medium
B
Blog
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
Blog — PlanetScale
Blog — PlanetScale
L
LangChain Blog
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Last Week in AI
Last Week in AI
Jina AI
Jina AI
V
V2EX
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
博客园 - 【当耐特】

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Learn Package Management on Arch Linux: pacman & yay
Ishan Jarwal · 2026-05-29 · via DEV Community
Cover image for Learn Package Management on Arch Linux: pacman & yay

Ishan Jarwal

Part 1: Understanding pacman

pacman is the default package manager for Arch Linux. It directly interacts with the official repositories and handles installation, updates, and removal of software.

Basic Syntax

sudo pacman [options] [package_name]

Enter fullscreen mode Exit fullscreen mode

Common pacman Commands

Task Command Description
Update package database and system sudo pacman -Syu Sync package list (-Sy) and upgrade all packages (-u).
Install a package sudo pacman -S <package> Installs package from official repo.
Remove a package sudo pacman -R <package> Removes a package (keeps dependencies).
Remove a package and its unused dependencies sudo pacman -Rns <package> Clean uninstall — removes package, configs, and dependencies.
Search for a package pacman -Ss <keyword> Search available packages.
List installed packages pacman -Q Shows all installed packages.
Show package info pacman -Qi <package> Displays metadata (version, size, dependencies).
Clean cache sudo pacman -Sc Removes old packages from cache.

🧹 Pro Tip

To free up space, remove unused dependencies and old cached packages:

sudo pacman -Rns $(pacman -Qdtq)
sudo pacman -Scc

Enter fullscreen mode Exit fullscreen mode

Part 2: Using yay for AUR Packages

The Arch User Repository (AUR) contains community-maintained build scripts (PKGBUILDs) for software not in the official repositories.

yay (Yet Another Yaourt) is a lightweight, fast, and user-friendly AUR helper that automates the build and installation process.

Basic Syntax

yay [options] [package_name]

Enter fullscreen mode Exit fullscreen mode

Common yay Commands

Task Command Description
Update everything (official + AUR) yay -Syu Sync and upgrade both official and AUR packages.
Install an AUR package yay -S <package> Automatically fetches, builds, and installs from AUR.
Search for AUR packages yay -Ss <keyword> Search both official and AUR repositories.
Remove a package yay -Rns <package> Same as pacman — removes package + unused dependencies.
Clean build cache yay -Sc Clean yay’s build directory.
List all AUR packages yay -Qm Shows all manually installed (AUR) packages.
Check for outdated AUR packages yay -Qua Lists AUR updates available.

💡 Tip: Unlike pacman, yay doesn’t need sudo for most operations until the build process actually installs system files — it will prompt automatically.

Flag Summary

Flag Tool Meaning
-S pacman/yay Install package(s)
-R pacman/yay Remove package(s)
-Ss pacman/yay Search package in repos
-Qi pacman Show package info
-Qm yay List manually installed (AUR) packages
-Syu pacman/yay Sync database and upgrade all packages
-Rns pacman/yay Remove package + dependencies + configs
-Sc pacman/yay Clean package cache
-Qdtq pacman List orphaned packages

Further Reading: