Why does composer remove a folder it doesn't manage I have the gesso theme installed in themes/contrib, and since I have not subthemed, all my components and templates live in within its folders. For that reason, I do not manage it with composer.
I needed to install a contrib module, and when I ran composer require, the first thing it did was remove gesso.
Why would this happen, and is there a way to tell it &quot;hands off&quot; ?
It isn't Composer, per se, that's removing your hacked gesso theme. Drupal uses the composer/installers Composer plugin to move different Drupal components (e.g. modules, themes, profiles) to the dir where Drupal needs them.
Once Composer has retrieved the drupal/gesso package, composer/installers will place it the contrib theme path in extra.installer-paths, thus overwriting your pre-existing hacked theme.
If you don't want Composer &amp; the installers plugin replacing your hacked gesso theme, you could do a couple of things:

Remove drupal/gesso from Composer management so it never tries to update or manage the theme again and add the hacked theme back to its previous location.
Use the cweagans/composer-patches Composer plugin to patch the drupal/gesso theme with your component/template hacks so they're added with every update.