When I want to compile something from source in Ubuntu/Debian, I usually get build-dependencies by running "sudo apt-get build-dep PACKAGE_NAME
" in the terminal.
They are (usually) useless once the compilation job is done.
So, how do I remove all build-dependencies for a particular package?