# how do i quit sage?

 0 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.8 asked Jun 17 '12 This post is a wiki. Anyone with karma >150 is welcome to improve it. Anonymous

## 4 Answers:

 2 I'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. Make sure you have all Sage and other Python-related processes closed. Might as well close everything you can. Open your Terminal.app program. This is located in Applications -> Utilities (if you go into Finder, you can also do Command+U). Make the Terminal window as tall as you can make it by dragging. 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. 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. Quit top by pressing q. Kill the process with the command kill 47776, where you replace the number with your number. 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  posted Jun 18 '12 kcrisman 7427 ● 17 ● 76 ● 166
 2 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.) posted Jun 18 '12 ooglyboogly 101 ● 1 ● 7 Hmm, 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.kcrisman (Jun 18 '12)
 1 William's killemall shell script is another good option. answered Jun 18 '12 This post is a wiki. Anyone with karma >150 is welcome to improve it. benjaminfjones 2545 ● 4 ● 36 ● 67 http://bfj7.com/ A little too draconian for my taste, but nice.kcrisman (Jun 19 '12)
 0 1) 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.) answered Jun 17 '12 This post is a wiki. Anyone with karma >150 is welcome to improve it. calc314 2200 ● 7 ● 25 ● 62

## Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

## Stats:

Asked: Jun 17 '12

Seen: 189 times

Last updated: Jun 18 '12

## Related questions

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.