Как мне полностью удалить приложение и предотвратить это?

449
Ivona

Мой Mac все еще запускает процессы из программы, которую я удалил. Как мне полностью удалить приложение и предотвратить это? Мой Mac все еще запускает процессы из программы, которую я удалил

4
Операционная система не может запустить процесс, в котором файл на самом деле не существует. Этот вопрос не имеет смысла. Ramhound 11 лет назад 0
@Ramhound Некоторые приложения хранят исполняемые файлы для вспомогательных процессов в папке поддержки приложений. user495470 11 лет назад 1
@ Ramhound Конечно, это так. Если вы запустите процесс и удалите исполняемый файл, программа все равно будет работать. Пока вы не остановите процесс или не перезагрузите компьютер, он продолжит работать. Matteo 11 лет назад 0
@Matteo - Ваш пример глуп, поскольку, если запущен процесс исполняемого файла, вы не сможете удалить сам файл, поскольку он будет использоваться процессом. Ramhound 11 лет назад 0
@Ramhound Вы можете без проблем удалить исполняемый файл: `cp / usr / bin / yes. ; ./yes> / dev / null &; гм да` Файл удален, процесс все еще выполняется. Matteo 11 лет назад 0

2 ответа на вопрос

1
Gary W. Longsine

There are several different ways that applications can be automatically started on Mac OS X. Some applications install some of their components, which may themselves be executable, in locations other than the main application folder. Tracking these down can be somewhat difficult if you don't know they exist, but once you do it's reasonably straightforward.

If the application doesn't have a built-in uninstall option, then you're left with tracking down the files and startup detritus. You can use the handy GUI application:

/Applications/Utilities/Activity Monitor

  • Launch the Activity Monitor, then select the process of interest;
  • click the blue (i) button to inspect it;
  • select the Open Files and Ports tab;
  • then click the "Sample" button to get a list of open files used by the process, which should show you its configuration and startup files, as well as the application executable itself, and potentially many other files).

    % lsof

If you prefer a UNIX command line, you can use the unix command lsof in a Terminal.app shell window. (Google lsof examples for details on lsof).

Other handy tips:

When you find the application configuration file, read it. This may have hints which will help you track down the non-typical locations of application components.

See if the application has a log file, and look in that log file or in the system log for hints about the location of startup configuration or files. Use the Console.app, or poke around in the directories and files with the unix command line. Most application logs will be in one of these places, on Mac OS X Mountain Lion.

  • ~/Library/Logs
  • /Library/Logs
  • /var/log

Knowing a little about the various startup methods can help you, too. Keywords to help in Google searches:

  • cron ("crontab -l" in a Terminal.app window, to show a user's crontab)
  • launchd ("launchctl list" in a Terminal.app window to show a list)
  • SystemStarter (deprecated, the binary is not present on Mountain Lion)

Some but probably not all locations where startup scripts or configuration files may be found:

  • /System/Library/LaunchAgents
  • /System/Library/LaunchDaemons
  • /Library/LaunchDaemons
  • /Library/LaunchAgents
  • ~/Library/LaunchAgents
  • /Library/StartupItems
  • /System/Library/StartupItems
  • ~/Library/StartupItems
0
jrc03c

I usually use AppCleaner to uninstall Mac applications. It's pretty good about grabbing all of the files that are required by an app. You may have to reboot after an uninstallation to see the effects.

If that doesn't work, you can always use Activity Monitor (or the command line) to kill the offending process, then use a little rm -rf /usr/bin/offending_file action on it, then reboot. Unfortunately, this option isn't very elegant; I wouldn't recommend it unless you have no other method for killing the rogue process.

Похожие вопросы