Remove graphical desktop packages from Debian image

I’m totally out of space (100%) disk usage on my Debian image flashed to a 4GB SD card for a Beaglebone White. Is there an easy way to remove all of the desktop oriented packages for users who are using these in a headless maner?

I started to poke around the installed packages with various dpkg -l scripts, but was wondering if such a collection already existed (on a wiki somewhere?).

Thanks!

–David

sudo apt-get remove lxqt-* xserver* --purge

But there's a lot of extra cruft..

For next time, take a look at:

iot image:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Debian_Image_Testing_Snapshots

Regards,