macOS10.14+卸載系統(tǒng)軟件掌实,以卸載并安裝舊版iTunes(12.6.3<最后一版內(nèi)置AppStore>以后的被蘋果移除了)為例

iTunes官網(wǎng)
iTunes12.6.3下載

一盖高、關(guān)閉SIP系統(tǒng)完整性保護(hù) (修復(fù)模式環(huán)境)

(一)、查看保護(hù)狀態(tài)仲闽,打開Mac終端輸入命令:csrutil status

  關(guān)閉了的是disable脑溢,開啟了的是enabled。默認(rèn)情況下是開啟赖欣。

(二)屑彻、已開啟(狀態(tài)為enabled),需要關(guān)閉

   1畏鼓、點(diǎn)擊logo重動(dòng)酱酬,同時(shí)按住鍵盤上面的command+r壶谒,進(jìn)入修復(fù)模式     
   2云矫、進(jìn)入終端(選擇實(shí)用工具Utilities --> 終端Terminal),
   3、終端輸入:csrutil disable汗菜,按return鍵让禀,(有可能要求你輸入管理員密碼)挑社。
   4、點(diǎn)擊logo重啟電腦巡揍。
   5痛阻、在終端,重查狀態(tài)(csrutil status), 如果為disable腮敌,則關(guān)閉成功阱当。

二、卸載軟件糜工,如iTunes (正常模式環(huán)境)

(一)弊添、手動(dòng)刪除:

image.png

1、在終端中輸入命令: sudo -i 進(jìn)入到系統(tǒng)的root目錄

sudo -i

2捌木、繼續(xù)輸入命令油坝,卸載iTunes

rm -rf /Applications/iTunes.app    

3、刪除相關(guān)路徑下刨裆,舊的相關(guān)iTunes文件夾

<1>~/Library 路徑下
image.png
<2>~/Music 路徑下
image.png

(二)澈圈、mac自帶的腳本編輯器(AppleScript), shell命令刪

image.png

方式一:會(huì)刪除原來iTunes

set question to display dialog "Delete iTtunes?" buttons {"Yes", "No"} default button 1
set answer to button returned of question
if answer is equal to "Yes" then
    do shell script "rm -rf /Applications/iTunes.app" with administrator privileges
    display dialog "iTunes was deleted" buttons {"Ok"}
    set theDMG to choose file with prompt "Please select iTunes 12.6 dmg file:" of type {"dmg"}
    do shell script "hdiutil mount " & quoted form of POSIX path of theDMG
    do shell script "pkgutil --expand /Volumes/iTunes/Install\\ iTunes.pkg ~/tmp"
    do shell script "sed -i '' 's/18A1/14F2511/g' ~/tmp/Distribution"
    do shell script "sed -i '' 's/gt/lt/g' ~/tmp/Distribution"
    do shell script "pkgutil --flatten ~/tmp ~/Desktop/iTunes.pkg"
    do shell script "hdiutil unmount /Volumes/iTunes/"
    do shell script "rm -rf ~/tmp"
end if
if answer is equal to "No" then
    display dialog "iTunes was not deleted" buttons {"Ok"}
    return
end if

set question to display dialog "Install iTtunes?" buttons {"Yes", "No"} default button 1
set answer to button returned of question
if answer is equal to "Yes" then
    do shell script "open ~/Desktop/iTunes.pkg"
    return
end if
if answer is equal to "No" then
    display dialog "Modified iTunes.pkg saved on desktop" buttons {"Ok"}
    return
end if

方式二:不會(huì)刪除iTunes

display dialog "Please select iTunes 12.6 dmg file" buttons {"Ok"}
set theDMG to choose file with prompt "Please select iTunes 12.6 dmg file:" of type {"dmg"}
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG
do shell script "pkgutil --expand /Volumes/iTunes/Install\\ iTunes.pkg ~/tmp"
do shell script "sed -i '' 's/18A1/14F2511/g' ~/tmp/Distribution"
do shell script "sed -i '' 's/gt/lt/g' ~/tmp/Distribution"
do shell script "pkgutil --flatten ~/tmp ~/Desktop/iTunes.pkg"
do shell script "hdiutil unmount /Volumes/iTunes/"
do shell script "rm -rf ~/tmp"

set question to display dialog "Install iTtunes?" buttons {"Yes", "No"} default button 1
set answer to button returned of question
if answer is equal to "Yes" then
    do shell script "open ~/Desktop/iTunes.pkg"
    return
end if
if answer is equal to "No" then
    display dialog "Modified iTunes.pkg saved on desktop" buttons {"Ok"}
    return
end if

運(yùn)行時(shí)如果 提示 iTunes Library.itl 錯(cuò)誤,刪掉

終端運(yùn)行命令:

sudo rm ~/Music/iTunes/iTunes\ Library.itl

三、恢復(fù)完整性保護(hù) (修復(fù)模式環(huán)境)

重復(fù)上面一中(二)的步驟帆啃,在終端輸入如下命令:csrutil enable瞬女。成功后會(huì)有成功的提示英文。重啟努潘,進(jìn)入正常模式拆魏。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市慈俯,隨后出現(xiàn)的幾起案子渤刃,更是在濱河造成了極大的恐慌,老刑警劉巖贴膘,帶你破解...
    沈念sama閱讀 216,651評(píng)論 6 501
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件卖子,死亡現(xiàn)場離奇詭異,居然都是意外死亡刑峡,警方通過查閱死者的電腦和手機(jī)洋闽,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,468評(píng)論 3 392
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來突梦,“玉大人诫舅,你說我怎么就攤上這事」迹” “怎么了刊懈?”我有些...
    開封第一講書人閱讀 162,931評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經(jīng)常有香客問我虚汛,道長匾浪,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,218評(píng)論 1 292
  • 正文 為了忘掉前任卷哩,我火速辦了婚禮蛋辈,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘将谊。我一直安慰自己冷溶,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,234評(píng)論 6 388
  • 文/花漫 我一把揭開白布尊浓。 她就那樣靜靜地躺著挂洛,像睡著了一般。 火紅的嫁衣襯著肌膚如雪眠砾。 梳的紋絲不亂的頭發(fā)上虏劲,一...
    開封第一講書人閱讀 51,198評(píng)論 1 299
  • 那天,我揣著相機(jī)與錄音褒颈,去河邊找鬼柒巫。 笑死,一個(gè)胖子當(dāng)著我的面吹牛谷丸,可吹牛的內(nèi)容都是我干的堡掏。 我是一名探鬼主播,決...
    沈念sama閱讀 40,084評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼刨疼,長吁一口氣:“原來是場噩夢(mèng)啊……” “哼泉唁!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起揩慕,我...
    開封第一講書人閱讀 38,926評(píng)論 0 274
  • 序言:老撾萬榮一對(duì)情侶失蹤亭畜,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后迎卤,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體拴鸵,經(jīng)...
    沈念sama閱讀 45,341評(píng)論 1 311
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,563評(píng)論 2 333
  • 正文 我和宋清朗相戀三年蜗搔,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了劲藐。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 39,731評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡樟凄,死狀恐怖聘芜,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情缝龄,我是刑警寧澤汰现,帶...
    沈念sama閱讀 35,430評(píng)論 5 343
  • 正文 年R本政府宣布挂谍,位于F島的核電站,受9級(jí)特大地震影響服鹅,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜百新,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,036評(píng)論 3 326
  • 文/蒙蒙 一企软、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧饭望,春花似錦仗哨、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,676評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至斟珊,卻和暖如春苇倡,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背囤踩。 一陣腳步聲響...
    開封第一講書人閱讀 32,829評(píng)論 1 269
  • 我被黑心中介騙來泰國打工旨椒, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人堵漱。 一個(gè)月前我還...
    沈念sama閱讀 47,743評(píng)論 2 368
  • 正文 我出身青樓综慎,卻偏偏與公主長得像,于是被迫代替她去往敵國和親勤庐。 傳聞我的和親對(duì)象是個(gè)殘疾皇子示惊,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,629評(píng)論 2 354