Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

When I try the purge command on my terminal, OS X Mavericks gives me the following message:

Unable to purge disk buffers: Operation not permitted

This hasn't been the default behavior until now. I wonder why Apple changed that. Is there a reason behind this decision? What are the advantages/disadvantages of this?

share|improve this question

4 Answers 4

up vote 16 down vote accepted

You need to run this command with root privileges. Try:

> sudo purge

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:

Enter your account's password and it should run the purge command.

Apple probably made the decision for security purposes. The only disadvantage is you have to type in your admin password. The advantage is, for non-admin users, they can not run this command and potentially harm their OS.

Usually commands that require sudo in order to run at all are potentially destructive or invasive. Two other commands with this requirement are dtrace and xcode-select.

share|improve this answer
2  
I was concerned about apps that presumably "speed things up" using purge. This answer helped me to understand why it's not a good idea. –  Gabriel Izaias Oct 24 '13 at 21:50
1  
I can not close a question as a duplicate across SE sites, so I blatantly copied your answer here. Feel free to post your own copy so I can delete my copy of your answer. –  Hennes Nov 8 '13 at 16:51
    
@Hennes Thanks, I reposted this answer. –  Mark Nov 8 '13 at 17:14

I'm no expert, but it may have something to do with the compressed memory thingy in OS X 10.9

http://www.apple.com/osx/advanced-technologies/

Doing more

The more memory your Mac has at its disposal, the faster it works. But when you have multiple apps running, your Mac uses more memory. With OS X Mavericks, Compressed Memory allows your Mac to free up memory space when you need it most. As your Mac approaches maximum memory capacity, OS X automatically compresses data from inactive apps, making more memory available

Exrta Fast

Once the memory is compressed, your Mac doesn’t have to waste time continually transferring data back and forth between memory and storage. So it’s able to get more done in less time. And since compressing and decompressing happens almost instantly, the only thing you’ll notice is how responsive everything feels. Especially when you’re doing everything at once.

They may have done that do avoid the older program from interfeering with the new way of doing things. But I have no idea.

share|improve this answer

'purge' does not release enough RAM. I am using SystemPal: https://itunes.apple.com/app/systempal/id453164367?mt=12 It works very well!

share|improve this answer
    
What differences in behaviour make you believe a third party app from the Mac App Store can purge more memory than an OS X included tool from Apple? –  Graham Miln May 28 at 8:34
    
Or that any app/casual-user could make better decisions about memory management than the kernel? –  jhfrontz Jul 14 at 23:07

Using the purge command can have serious negative effects on the performance of the system (since you are essentially telling the kernel to forget all of its accumulated knowledge about your recent usage, walk through the inactive list and toss everything -- even if some process/driver was about to make use of it -- and then fault/recreate it all again from scratch). Thus, it makes sense that it would require some level of privilege to execute it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.