I'm trying to install packages with having as little files from their dependencies as possible, since system size is important to me.
For example, when wanting to install a package, I could install it with
apt-get install on another system and then systematically go through
apt-cache depends (shows all packages it depends on) for it and all it's dependencies until I have a (sizable) list of packages.
Then I would go through that list with
dpkg -L (shows all installed files by the package) to get a (gigantic) list of files that I would need to copy to my system to make the original package work.
I did this with the
python package and got lucky after only a handful of tries. Other packages seem to be more complicated sadly.
There must surely be a better way to find a minimal set of files, that is really necessary to successfully install the package. Some obviously useless candidates are
Is there a way to find out, which particular file from a dependency is necessary? (e.g. only one library file from a whole collection)
Are there other ways to get the minimal set of files, other than picking some out and trying if it still works?
Is my approach to gathering the necessary files the correct one?
Also: Would compiling from source be an option? I'm still completely unfamiliar with this practice and will look that up next.
EDIT: I'm using XUbuntu 14.04.