Command

grep -E "installed|upgraded|removed" /var/log/pacman.log

Purpose

Shows which packages were installed, upgraded, or removed.

When To Use

Use this after a system update or when debugging a broken system to see what changed.

Workflow Role

Audit step after a system upgrade or before troubleshooting.

Logic

Reads /var/log/pacman.log and filters only package action entries.

Automation (Optional)

grep -E "installed|upgraded|removed" /var/log/pacman.log | tail -n 20

Single Example

You run a full system update, something breaks, and you check the last 20 package actions to identify the likely cause.

Quick Note

pacman.log grows over time, so filtering or limiting output keeps it readable.