EFanZh’s Blog

Some useful commands

aptitude

Normalize package dependencies

aptitude search -F '%p' '~i !~M (~R~i | ~P~R~i)' | xargs -r aptitude markauto -y
aptitude search -F '%p' '!~E ~M !(~R~i | ~P~R~i)' | xargs -r aptitude purge --purge-unused -y

FFmpeg

Remove remove sequentially duplicate frames

ffmpeg -i INPUT_FILE -vf mpdecimate,setpts=N/FRAME_RATE/TB OUTPUT_FILE

pacman

Normalize package dependencies

# For Bash.

comm -23 <(pacman -Qeq) <(pacman -Qeqtt) | xargs -r sudo pacman -D --asdeps
# For Fish.

comm -23 (pacman -Qeq | psub) (pacman -Qeqtt | psub) | xargs -r sudo pacman -D --asdeps

Others

Bring swap memories back online

# For sh.

sudo swapoff -a && sudo swapon -a
# For Fish.

sudo swapoff -a; and sudo swapon -a