sudo apt-get install rubygems1.8 this began installing dependencies and in the process broke with a "cannot find ldconfig in path" error. So apt-get is now unable to run because dpkg is broken. this means apt-get -f install also fails, along with apt-get remove.