Here's an issue I've experienced with using upgrade: https://github.com/yarnpkg/yarn/issues/5749
Sounds like what I'd expect from running yarn clean...
(If anyone isn't aware: that command doesn't clean target folders but rather goes crazy inside node_modules.)