This is based on the Silo by Hugh Howey. I don't have any spoilers here though. In that book (actually a collection of 5 novels), the characters live in an underground city, and some of them mine for metal ores and crude oil. What would they do with the leftover rock separated from the ore and from digging pipelines? They cannot access the outside. Is there a way to get rid of the rock, or is this just something the author did not think about?
A Zero-Sum Game
You have an initial volume. As you dig a new mine shaft, the tailings go into an old mine shaft and the metal goes into the living areas. If the tailings have roughly the same density as the ore, it evens out.
- It doesn't work quite that way for oil, but then burning oil will give all sorts of problems in a closed ecosystem.
- As the area around the habitat caves gets mined out, more volume will be taken by transit corridors and less by living caves. At some point they might have to dig new living caves nearer to the mines, and fill the old living caves and transit corridors.
its possible that if these miners have access to underground rivers then they could be pulverising the rock and sending it down steam without ever directly encountering the outside world (this would be especially supported if it's the case that these people get their water from an underground river but I don't know if that is the case.)
porous rock and Kilns could probably also solve your problem. When placed in a kiln many rocks decompose, giving off gas (carbonates like limestone give of carbon dioxide sulphates give off sulphur dioxide) when they do this they shrink so you produce the space you need. Most underground caves and mines are not perfectly sealed from the outside world they leak so the partial pressure of the gases produced would slowly force them into the outside world. The gases would however kill all your inhabitants so a special "leaky zone" would need to be set up to divert the gases too. While this should work in theory i'd be very dubious about it in practice and I personally would never trust it with my life. If this works it could be made more effective by using electrolysis to turn rocks into metal (mostly silicon) and gas.
Or alternatively you have as O.M. suggests a "zero sum game" however the region contains enough voids (i.e. caves, valleys, sink holes or other man made mineshafts) to keep adding space into system to make up for lost space. its worth noting that simply because of how packing works your tailings aren't going to be as dense as your rock (its impossible infact). Think of it like this: take a jigsaw puzzle draw around the rectangle the solved puzzle and then try to fit the pieces in that rectangle without solving the puzzle. its impossible in the same way, you wot be able to fit all your rocks together perfectly after the fact so you do need a constant influx of new space.
Density Living underground, the issue is how to create space. The only way you can make space is by putting more stuff in less room, so they would have to pack the dirt somehow. A trash compactor or just something heavy and mobile would do the trick, but you have another issue to deal with - the leftover gasses from burning the oil.