I'm starting a project where all I really want is a shell with apt-get or something similar.I've searched for small distros, and there are plenty, but I don't need any GUI other than command line.  I'm sure a better search would yield better results, but it's rather saturated for me not knowing the proper key words.The project is making a Raspberry Pi run different scripts based off which USB drive is inserted, so all I need to know is what USB drive is inserted and have some way to connect that to running a script.EDIT: this did not come up when I searched, but it came up in the sidebar once I'd typed my question. What is the smallest possible Linux implementation?Linux From Scratch seems to be my answer, but I'm going to leave the question up until I'm certain, and have it open to better answers should they exist.EDIT 2: Linux From Scratch is apparently not for Raspberry Pi's, nor very easy to update.  It's more hobbyist than functional, is the gist I've gotten.
What is the most basic version of Linux with a package-manager?
shell;distribution choice;small distribution
It's not really clear what you're asking.apt-get is package manager - it is used to get packages(programs) from repository, which is remote server, to your computer - and install them. However, apt-get is mostly used on Debian or Ubuntu - there are many other package managers: pacman is used by Arch, Portage is used by Gentoo, etc.Your minimalistic installation with apt-get  is, therefore, imprecise. You could try going with Gentoo - you'd compile kernel yourself(hence you could exclude things you wouldn't use), you would install most programs by yourself(the basic pool of programs is pretty small for Gentoo). You could also install apt-get and use it instead of Portage, if you really want it.There is also distribution of Gentoo for Raspberry Pi, so this could also fulfil your requirements. However, be careful what you wish for; from your post I'd rather say that you aren't experienced Linux user. Therefore it might be easier for you to go with Raspbian (or whatever was Debian for Pi called), and just don't use GUI. Setting your own distribution takes time and knowledge - if you haven't done it before, it might be too hard for you to get done in reasonable timeframe.