What is the Offline behavior?
Yarn provides a yarn-offline-mirror feature which saves tarballs of the modules that are used to a specified directory. This can be shared across projects or just used for one project
Yarn only writes to this directory. It never deletes from the directory.
If you are only using the directory for one project and are checking it into git, you may wish to only keep files in the offline mirror for packages currently being used by the project. This is the behavior of the npm “shrinkpack” utility.