#!/bin/sh

while true;
do
    PORT=$(pkg_info -mz | fzf -e --sync --bind start:last)
    [ ! -z $PORT ] \
        && doas pkg_delete -c "$PORT"
    [ -z $PORT ] \
        && exit 0
done
pkg_delete -ac
