Remove old version of packages


How can I remove old version of packaes. For example, in .atom/.node-gyp/.atom/.apm/isotope-ui I have many subfolders like ‘0.1.7’, ‘0.1.8’.

Is there any way to remove old versions of all packages ?


The ~/.atom/.node-gyp/ folder is a cache folder for packages and their dependencies. Different versions of each package exist because different packages might require different dependencies. For example, if package-one depends on library-v0.5.0 but package-two depends on library-v1.0.0 then both will be cached and both can be potentially used for other packages.

In your example of ~/.atom/.node-gyp/.atom/.apm/isotope-ui it is indeed less useful to have multiple versions of the isotope-ui package, since currently native atom packages cannot depend on each other, but this is something that is likely to change in the future.

That said, Atom stores its actual packages in ~/.atom/packages so it’s safe to delete the ~/.atom/.node-gyp/ folder. It’ll be recreated when you’re installing or upgrading a package. To make this easier npm supports the npm cache clean command, but as far as I’m aware there is no equivalent for apm.