What is the spago equivalent of yarn remove
or npm uninstall
?
Is there no way to remove packages as with Haskell stack? If so, what are the steps to remove a package manually?
Just remove the package make from spago.dhall
, that's it.
npm
has to have a special command for this, because node
doesn't care what's in package.json
, it will pick up any packages that are in node_modules
. This means that npm uninstall
has to remove the package from package.json
, but then also delete it from node_modules
, was well as all its dependencies.
Spago, on the other hand, doesn't need to do this, because spago.dhall
is the single source of truth. Even if the package files are present inside the .spago
directory, they will not be used in compilation unless the package is also mentioned in spago.dhall
This also works the other way around: if you just add a package to spago.dhall
, Spago will automatically download it next time you run any Spago command.