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?
Best Answer
To find out the build-dependencies of a program you can run
apt-cache showsrc pkgname
and that will list, amongst other information theBuild-Depends
, which are often files ending in-dev
; although it is worth checking if any of the files (particularly those not marked-dev
) are required by other programs. You could find this out by usingapt-cache depends file
andapt-cache rdepends file
. The following example is forShotwell
:There is a command to do it all in one go at the webupd8 site, but I have found that it doesn't seem to work reliably with the current version of Ubuntu in that it seems to remove too much. I tried it with Pinta and it suggested removing the entire mono library. There is discussion of such problems with using commands like the webupd8 one at Launchpad. Be very careful when experimenting with any 'solutions' you might find.
It is a shame that there is no
autoremove
command forbuild-dep
installed packages.