I don't have a large SSD disk and every now and then I want to run a VM and I run out of storage, I want to run a nodejs project that for some reason needs an insane amount of storage for npm modules, or I want to test something and I need to install Maven/JDK and all similarly large packages.
Is there a way we deal with applications on the cloud in a similar way we deal with files on the cloud? Maybe only install or use a program when it is needed without removing and installing every time?
Edit: Suppose I want to run a haskell code and I need to install the haskell compiler but I do not have any space left on storage. The way I'm thinking of resolving this is one of two solutions. 1) The code will run in a remote machine and I get back the result. 2) An already installed application, maybe a program that I haven't used in a while, get pushed out of disk to make space for the haskell compiler to run the code. That pushed/kicked application would only make it back when there is sufficient space for it or if I want to run something using that application.
I'm looking to make all of this very seamless, either of the scenarios or maybe a scenario 3 that solves this issue of no space in disk for applications.