Ask Your Question

how do i quit sage?

asked 2012-06-17 13:28:53 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

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

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2012-06-18 10:03:34 +0100

kcrisman gravatar image

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.

  1. Make sure you have all Sage and other Python-related processes closed. Might as well close everything you can.
  2. Open your program. This is located in Applications -> Utilities (if you go into Finder, you can also do Command+U).
  3. Make the Terminal window as tall as you can make it by dragging.
  4. 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.
  5. 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.
  6. Quit top by pressing q.
  7. Kill the process with the command kill 47776, where you replace the number with your number.
  8. 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
edit flag offensive delete link more

answered 2012-06-18 13:08:06 +0100

ooglyboogly gravatar image

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.)

edit flag offensive delete link more


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 gravatar imagekcrisman ( 2012-06-18 14:06:15 +0100 )edit

answered 2012-06-18 23:32:07 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

William's killemall shell script is another good option.

edit flag offensive delete link more


A little too draconian for my taste, but nice.

kcrisman gravatar imagekcrisman ( 2012-06-19 09:37:18 +0100 )edit

answered 2012-06-17 16:21:36 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

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.)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-06-17 13:28:53 +0100

Seen: 3,881 times

Last updated: Jun 18 '12