Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking to remove some services completely, or at least from the list in the Keyboard preference pane. I've tried:

  1. Service Scrubber. It only removes services from the menu — something you've been able to do from System Preferences since 10.6.
  2. Removing files in ~/Library/Services/ and /Library/Services/. It's just that most third party apps don't put their services there.
  3. defaults delete /Applications/ NSServices. It does remove the services from the list in System Preferences. But it also invalidates the bundle's code signature, and the changes can get reverted by updates.

I guess you'd just have to settle for the last option, and assign new signatures with codesign when needed. But is there any easier way?

share|improve this question
Ah, the beauty of OS X complicating things that should be simple. – cregox Mar 25 '11 at 18:09
Which version of OS X are you running? The internals of OS X do tend to change quite drastically between major versions. – Majenko Mar 27 '11 at 19:23
@Cawas: removing services is simple: you go to the list in System Preferences and uncheck them. What Lri wants to do, for some reason, is to remove them and making them impossible to restore. Why should it be easy to break stuff? – LaC Mar 28 '11 at 23:40
@LaC it's probably a matter of taste in this case. In my case I wanted good old Expose. but let me reverse your question: it is simple to add the service to that list - why shouldn't it be simple to remove it completely and keep it clean if the admin so wish? – cregox Mar 28 '11 at 23:52
AFAICT, it's just as simple. You add a service by putting it into Library/Services or installing an application that provides it. You remove a service by removing it from Library/Services or removing the application that provides it. – LaC Mar 28 '11 at 23:58
up vote 3 down vote accepted

applist="Path Finder

for appname in $applist; do
    apppath=$(mdfind -onlyin /Applications/ -onlyin ~/Applications/ \
    -onlyin /Developer/Applications/ -onlyin /System/Library/CoreServices/ \
    'kMDItemKind == Application' | grep -i "/$$" | head -1)
    echo $apppath
    date=$(date '+%y%m%d%-H%M%S')
    cp "$apppath/Contents/Info.plist" "$apppath/Contents/Info-$date.plist"
    defaults delete "$apppath/Contents/Info" NSServices
    codesign -f -s - "$apppath"
share|improve this answer
Any particular Certificate Type in step 2? – Daniel Beck Jun 2 '11 at 18:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .