I've successfully built ruby 2.1.1
on Ubuntu/Debian by installing the following dependencies:
apt-get install \
autoconf \
bison \
build-essential \
libssl-dev \
libyaml-dev \
libreadline6 \
libreadline6-dev \
zlib1g \
zlib1g-dev
After the build want to remove packages I don't need anymore as I'm trying to keep this image as small as possible.
Which of these (if any) can I remove after the build? Is there a heuristic for this?