We’re rewarding the question askers & reputations are being recalculated! Read more.
1 of 3

You can find all manually installed packages without their dependencies as follows:

apt-mark showmanual | sort > manually-installed.txt

apt show $(apt-mark showmanual) 2>/dev/null | grep -e ^Depends -e ^Pre-Depends > deps1.txt
cat deps1.txt | sed 's/^Depends: //; s/^Pre-Depends: //; s/(.*)//g; s/:any//g' > deps2.txt
cat deps2.txt | tr -d ',|' | tr ' ' '\n' | grep -v ^$ | sort -u > all-dep-packages.txt

grep -v -F -f all-dep-packages.txt manually-installed.txt

You can also use the following one-liner magic:

apt-mark showmanual | sort | grep -v -F -f <(apt show $(apt-mark showmanual) 2> /dev/null | grep -e ^Depends -e ^Pre-Depends | sed 's/^Depends: //; s/^Pre-Depends: //; s/(.*)//g; s/:any//g' | tr -d ',|' | tr ' ' '\n' | grep -v ^$ | sort -u)