EFanZh’s Blog

Some useful commands

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 pacman -D --asdeps
# For Fish.

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

Others

Bring swap memories back online

# For sh.

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

swapoff -a; and swapon -a