When I run:apt-get build-dep <package>privileged it installs the build dependencies for <package>.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-devdebhelperdpkg-devlibexpat-devlibgd2-noxpm-devlibgeoip-devliblua5.1-devlibmhash-devlibpam0g-devlibpcre3-devlibperl-devlibssl-devlibxslt1-devzlib1g-devThe packages the complete apt-get autoremove wants to remove are:build-essential debhelper dpkg-dev libpcre3-dev libpcrecpp0 libssl-dev zlib1g-devEspecially build-essential isn't desirable here, but I can fix that on my own.The actual list of packages that got installed were:debhelperdh-apparmorgettexthtml2textintltool-debianlibcroco3libgettextpo0libpcre3-devlibpcrecpp0libssl-devlibunistring0po-debconfzlib1g-dev
How can I reverse the effect of apt-get build-dep ?
apt