從 com.apple.launchd 中刪除啟動項

從 com.apple.launchd 中刪除啟動項

幾個月前我安裝了一個程序,它有一個我安裝的啟動選項。後來,我決定刪除該程序,但即使在我卸載它之後,它似乎仍然留下了啟動腳本或專案......並且它嘗試每隔幾秒鐘啟動一次。

我怎麼才能刪除這個項目?

這是來自控制台的


$ com.apple.launchd[1] (com.jft.PdaNetMac[24476]): Exited with exit code: 1
$ com.apple.launchd[1] (com.jft.PdaNetMac): Throttling respawn: Will start in 10 second

答案1

這些確實是 launchd 查找的標準位置。

如果找不到該文件,您也可以在終端機中嘗試以下操作:

$ launchctl remove com.jft.PdaNetMac

若要查看所有已啟動作業的清單:

$ launchctl list
PID Status  Label
78960   -   0x7fe25c1052f0.anonymous.launchctl
78923   -   0x7fe25c008e40.anonymous.pppd
78922   -   0x7fe25c007e50.anonymous.pppd
78841   -   0x7fe25ae0c470.anonymous.Google Chrome H
78704   -   0x7fe25c006c90.anonymous.Google Chrome H
84037   -   0x7fe25ac258c0.anonymous.dbfseventsd
31909   -   0x7fe25c0081c0.anonymous.Google Chrome H
25351   -   [0x0-0x1e51e5].com.skype.skype
...

有關更多信息,請嘗試man launchdman launchctl

答案2

檢查以下位置 ~/Library/LaunchDaemons、~/Library/LaunchAgents、/Library/LaunchDaemons、/Library/LaunchAgents/、/System/Library/LaunchDaemons/ 和 /System/Library/LaunchAgents 可能會有一個檔案在這些目錄之一中名為com.jft.PdaNetMac。只需將其移至垃圾箱並重新啟動即可。

答案3

Pda網路Mac目前帶有這樣的卸載腳本:

sudo rm /System/Library/LaunchDaemons/com.jft.PdaNetMac.plist 
sudo rm -R /System/Library/Extensions/PdaNetDrv.kext 
sudo rm -R /Applications/PdaNetMac.app 
sudo rm ~/PdaNetUninstall.sh 
echo "PdaNet has been uninstalled, please reboot your computer" 

所以 launchd 屬性列表位於/System/Library/LaunchDaemons/.內核擴展可能也應該被刪除。

相關內容