When I update packages (from the IDE), if I end up updating packages that are in use, it prompts me asking if I want to restart R. I say "yes" and it restarts, and... and... it doesn't work.
The Mac version of the IDE has worked this way for a long time and it's an annoying bug. I believe that the problem is that it (evidently only the Mac version) will automatically load libraries that are necessary for variables in the environment, so after the restart some libraries are automatically reloaded. My manual workaround is to first clear the environment, then restart R, then update packages. Works every time, but I wish it would be fixed.
At a minimum, the easy fix is to warn the user that the environment will be cleared and prompt if they want to: a) cancel, b) continue without saving, or c) save the environment and continue. Then do that.