ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 19 Jun 2012 02:37:18 -0500how do i quit sage?http://ask.sagemath.org/question/9080/how-do-i-quit-sage/I am trying to delete sage from my computer to prepare to give it away to a relative, but it says it is in use when I try to empty the garbage. How do I quit sage, and then uninstall it?
I have mac osx 10.6.8Sun, 17 Jun 2012 06:28:53 -0500http://ask.sagemath.org/question/9080/how-do-i-quit-sage/Answer by ooglyboogly for <p>I am trying to delete sage from my computer to prepare to give it away to a relative, but it says it is in use when I try to empty the garbage. How do I quit sage, and then uninstall it?</p>
<p>I have mac osx 10.6.8</p>
http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?answer=13724#post-id-13724I think the application Activity Monitor is the easiest way to track down rogue processes. It's in the utilities folder in the applications folder. Open that, and then take kcrisman's advice of killing python processes. Do that by selecting the process, and clicking the stop sign at the top left. You can normally just quit, but sometimes you need to force quit (which is like the kill -9 that kcrisman suggests.)Mon, 18 Jun 2012 06:07:43 -0500http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?answer=13724#post-id-13724Answer by benjaminfjones for <p>I am trying to delete sage from my computer to prepare to give it away to a relative, but it says it is in use when I try to empty the garbage. How do I quit sage, and then uninstall it?</p>
<p>I have mac osx 10.6.8</p>
http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?answer=13726#post-id-13726William's [killemall](https://github.com/williamstein/bin-scripts) shell script is another good option.Mon, 18 Jun 2012 16:32:07 -0500http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?answer=13726#post-id-13726Comment by kcrisman for <p>William's <a href="https://github.com/williamstein/bin-scripts">killemall</a> shell script is another good option.</p>
http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?comment=19568#post-id-19568A little too draconian for my taste, but nice.Tue, 19 Jun 2012 02:37:18 -0500http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?comment=19568#post-id-19568Answer by calc314 for <p>I am trying to delete sage from my computer to prepare to give it away to a relative, but it says it is in use when I try to empty the garbage. How do I quit sage, and then uninstall it?</p>
<p>I have mac osx 10.6.8</p>
http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?answer=13721#post-id-137211) I suggest using Command-Option-Esc to see a list of what is currently running. Then, you can "Force Quit" Sage, if it is running. Dragging the sage folder to the trash should do it after that.
2) You might need to restart or just log out and log back in before emptying the trash. At times, I have had to do this with my Mac to make sure all processes are closed that might be related to what I was deleting. What you are encountering sounds more like a Mac issue than a Sage issue to me based on what you've written. (And it seems like an issue that I've seen before with other items.)
Sun, 17 Jun 2012 09:21:36 -0500http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?answer=13721#post-id-13721Answer by kcrisman for <p>I am trying to delete sage from my computer to prepare to give it away to a relative, but it says it is in use when I try to empty the garbage. How do I quit sage, and then uninstall it?</p>
<p>I have mac osx 10.6.8</p>
http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?answer=13723#post-id-13723I've had this problem with "ghost Python processes" before as well when trying to delete old copies of Sage. There is something weird with how Terminal finishes certain processes. Here's how I've dealt with it.
1. Make sure you have all Sage and other Python-related processes closed. Might as well close everything you can.
1. Open your `Terminal.app` program. This is located in `Applications -> Utilities` (if you go into Finder, you can also do Command+U).
1. Make the `Terminal` window as tall as you can make it by dragging.
1. Run the command `top -o -command -O time`. This will list all processes (a lot) in reverse alphabetical order by command name (the first thing) and then in order by how long they ran, if there is more than one with the same name.
1. You'll be looking for the ones labeled `python`. If there are some that don't seem to be doing much and have fairly high `PID` values, they are probably from old Sage runs. I don't know why they don't die. Here's a sample from mine now.
1. Quit `top` by pressing `q`.
1. Kill the process with the command `kill 47776`, where you replace the number with your number.
1. If that doesn't kill it (check with `top` again), then use `kill -9 47776`.
I can't guarantee that this will be your process, but on a Mac the process ID should be something five digits, so this is quite likely it.
It won't format right if I don't put it here - here is a piece of what `top` output looks like. Notice the ID number on the left.
05- scClient 0.0 03:54.38 3 1 65 79 332K 4340K 1268K 31M
86067 quicklookd 0.0 00:00.43 9 2 101 127 12M 14M 24M 557M
47776 python 0.0 01:59.77 1 0 19 79 1016K 244K 1632K 11M
169- prl_naptd 0.0 01:32.74 3 1 45 76 364K 8232K 2228K 30M
193- prl_disp_ser 0.1 15:21.21 12 1 5814 123 1996K 8296K 6232K 36M
Mon, 18 Jun 2012 03:03:34 -0500http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?answer=13723#post-id-13723Answer by ooglyboogly for <p>I am trying to delete sage from my computer to prepare to give it away to a relative, but it says it is in use when I try to empty the garbage. How do I quit sage, and then uninstall it?</p>
<p>I have mac osx 10.6.8</p>
http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?answer=13725#post-id-13725I think the application Activity Monitor is the easiest way to track down rogue processes. It's in the utilities folder in the applications folder. Open that, and then take kcrisman's advice of killing python processes. Do that by selecting the process, and clicking the stop sign at the top left. You can normally just quit, but sometimes you need to force quit (which is like the kill -9 that kcrisman suggests.)Mon, 18 Jun 2012 06:08:06 -0500http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?answer=13725#post-id-13725Comment by kcrisman for <p>I think the application Activity Monitor is the easiest way to track down rogue processes. It's in the utilities folder in the applications folder. Open that, and then take kcrisman's advice of killing python processes. Do that by selecting the process, and clicking the stop sign at the top left. You can normally just quit, but sometimes you need to force quit (which is like the kill -9 that kcrisman suggests.)</p>
http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?comment=19574#post-id-19574Hmm, that's probably even easier. I have admit I have never used it, because I don't know what it does as compared to top - but top is just something someone showed me once, I've only slowly gotten used to it.Mon, 18 Jun 2012 07:06:15 -0500http://ask.sagemath.org/question/9080/how-do-i-quit-sage/?comment=19574#post-id-19574