I've accidentally done this a couple times when trying to remove linked packages for the official versions. Luckily, I have a list of all of my installed packages saved and a script to install all of them (for new computers).
I'm not clear on what exactly the issue is. Are you saying you accidentally typed .RETURN? So you'd like it if apm uninstall . would _not_ uninstall everything but instead return an error?
Also, you can use apm unlink --dev --all to unlink all dev packages or apm unlink --all to unlink all linked packages.
Yes, i typed apm rm .Return. Yes, it should not uninstall everything, but instead either return an error or display an "Are you sure?" prompt, or unlink the package in the current directory. npm rm . and npm unlink . will unlink the package in the current directory, i.e. if there is a package.json in the current directory, it will uninstall the package under the package.json's name field.
Thanks for the tip on unlink though. I need to RTFM the semantic difference between unlink and rm.
Edit: Expected behaviour: https://gist.github.com/forivall/d692aa4a769a4dce7b59 (i apologise in advance for my childishness). Edit again: of course @meandavejustice has the actual butts package on npm.
I just run apm uninstall . because I've done apm install . just before to install my local package and every packages have been removed.
I don't really know how apm uninstall . must act but I think, install and uninstall must have same behaviour.
This just happened to a colleague of mine too. He expected apm uninstall . to uninstall the package in the current directory, and accidentally wiped away all of his packages.
I think it'd be a useful UX improvement to output a warning on apm uninstall . that asks whether you intended to uninstall all of the packages on your system.
The main issue, like socketdubs said, is that install and uninstall have different behaviour when passed .
I've just done that too 馃槩
Is there a log of installed packages anywhere?
Eyyyyup, fell victim to this just now. Decided to run apm uninstall . from ~/.atom/packages/languages-csound, thinking it'd have analogous behaviour to apm install ., but it wiped the entire packages folder (half of which were symlinked directories). In the middle of amending my Makefile to enable packages to be reinstalled/relinked programmatically.
(i apologise in advance for my childishness).
You call that childish? Dude, take it from a pro.
Most helpful comment
I just run
apm uninstall .because I've doneapm install .just before to install my local package and every packages have been removed.I don't really know how
apm uninstall .must act but I think,installanduninstallmust have same behaviour.