禁用 Firefox 自动更新(macOS 版)

禁用 Firefox 自动更新(macOS 版)

配置 Firefox 策略文件

获取最新或者对应版本的策略模板:https://github.com/mozilla/policy-templates/releases

自动更新策略描述如下:

{
  "policies": {
    "DisableAppUpdate": true | false
  }
}

创建 Firefox 策略配置文件

Firefox.app/Contents/Resources/distribution/policies.json

禁用自动更新则将以下内容写入 policies.json 文件中

{
  "policies": {
    "DisableAppUpdate": true
  }
}

命令行实现

可以直接执行如下终端命令,更加便捷,不用额外配置上述策略文件。

  • 启用策略
sudo defaults write /Library/Preferences/org.mozilla.firefox EnterprisePoliciesEnabled -bool TRUE
  • 禁用自动更新
sudo defaults write /Library/Preferences/org.mozilla.firefox DisableAppUpdate -bool TRUE

效果

此时 “首选项” 中 Firefox 更新,提示“更新已被系统管理员禁用”,检查更新按钮也不可用!

猜你喜欢

转载自blog.csdn.net/netgc/article/details/107593377