For example, when I want to remove Xfce, I did this:
aptitude search xfce | grep ^i
id gtk2-engines-xfce - GTK+-2.0 theme engine for Xfce
id libxfce4ui-common - common files for libxfce4ui
id libxfce4util-common - common files for libxfce4util
I want to get the second column and pass them to aptitude remove
. Is there a way to do it?