Skip to content

Instantly share code, notes, and snippets.

@crdueck
Created September 24, 2016 02:26
Show Gist options
  • Save crdueck/685b7bd3ad1b91d02bbd744955a30b2e to your computer and use it in GitHub Desktop.
Save crdueck/685b7bd3ad1b91d02bbd744955a30b2e to your computer and use it in GitHub Desktop.
pacman-disowned
#!/bin/sh
tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
db=$tmp/db
fs=$tmp/fs
mkdir "$tmp"
trap 'rm -rf "$tmp"' EXIT
pacman -Qlq | sort -u > "$db"
find /etc /opt /usr ! -name lost+found \( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
comm -23 "$fs" "$db"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment