When I run:
apt-get build-dep <package>
privileged it installs the build dependencies for
Now, I know that I can use
apt-cache depends <package> to see binary dependencies. I haven't found any way to show the same information for build dependencies in a single command invocation, which I could then use to achieve what I want.
So, how can I reverse the effect of a
apt-get build-dep <package>, i.e. remove the packages previously installed by an invocation of that command?
Braiam's answer below yields for the packages that are build dependencies:
autotools-dev debhelper dpkg-dev libexpat-dev libgd2-noxpm-dev libgeoip-dev liblua5.1-dev libmhash-dev libpam0g-dev libpcre3-dev libperl-dev libssl-dev libxslt1-dev zlib1g-dev
The packages the complete
apt-get autoremove wants to remove are:
build-essential debhelper dpkg-dev libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev
build-essential isn't desirable here, but I can fix that on my own.
The actual list of packages that got installed were:
debhelper dh-apparmor gettext html2text intltool-debian libcroco3 libgettextpo0 libpcre3-dev libpcrecpp0 libssl-dev libunistring0 po-debconf zlib1g-dev