There are many ways to show packages installed manually using apt, such as:apt-mark showmanualBut sometimes that output is too much.  For example if the user manually installed package foo:apt-get install foo...and foo depended on bar and baz, then apt-mark showmanual would output:barbazfooHow can we list only the top level manually installed packages (i.e. foo) without their dependencies (i.e. not baz, nor bar)?The following code seems to work, but GNU parallel calling apt-rdepends a few hundred times is just too slow, (three hours with a 4 core CPU):apt-mark showmanual | tee /tmp/foo | parallel apt-rdepends -f Depends,PreDepends,Suggests,Recommends {} |          tail +2 2> /dev/null | tr -s ' ' '\n' | grep -v '[():]' | sort -u | grep -wv -f - /tmp/foo
List top level manually installed packages without their dependencies
debian;ubuntu;apt;deb