Giter Club home page Giter Club logo

homebrew-autoupdate's Introduction

Homebrew Autoupdate

An easy, convenient way to automatically update Homebrew.

This script will run brew update in the background once every 24 hours (by default) until explicitly told to stop, utilising launchd.

brew upgrade and brew cleanup can also be handled automatically, but are optional flags.

Notifications are enabled by default on macOS Big Sur using a new, code-signed, universal AppleScript applet. On older versions of macOS, if you have terminal-notifier installed, you can also request desktop notifications when this command runs.

A comic highlighting humanity's habit of skipping important updates

Installing this command

Just brew tap homebrew/autoupdate.

Now run brew autoupdate start [interval] [options] to enable autoupdate.

Example

brew autoupdate start 43200 --upgrade --cleanup --immediate --sudo

This will upgrade all your casks and formulae every 12 hours and on every system boot.
If a sudo password is required for an upgrade, a GUI to enter your password will be displayed.
Also, it will clean up every old version and left-over files.

Casks that have built-in auto-updates enabled by default will not be upgraded.

Usage

Refer to the link below to find an in-depth description of the commands.

Homebrew Documentation autoupdate subcommand

Logs of the performed operations can be found at: ~/Library/Logs/com.github.domt4.homebrew-autoupdate

This vs brew's built-in autoupdate mechanism

This command mostly exists to ensure Homebrew is updated regardless of whether you invoke brew or not, which is the primary difference from the autoupdate mechanism built into brew, the latter requiring a user to explicitly run any of brew install, brew tap or brew upgrade.

If you run brew commands regularly yourself, you may wish to consider using the built-in autoupdate mechanism, which can be instructed to autoupdate less often, or disabled entirely. If you wish to update every 24 hours using the built-in autoupdate mechanism set this in your environment:

export HOMEBREW_AUTO_UPDATE_SECS="86400"

or if you wish to disable the built-in autoupdate mechanism entirely:

export HOMEBREW_NO_AUTO_UPDATE="1"

Please note that Homebrew slightly frowns upon people disabling the built-in autoupdate mechanism.

TO-DO (PRs Welcome)

  • Complete broader testing and roll-out of new, experimental notification Support was added in 6365cc020 that doesn't require or use any external dependencies, using only an Applescript applet. Related Issue

History

This tap was created by DomT4 in April 2015 to address a personal desire for a background updater, before being moved to the Homebrew organisation in April 2021 to become an official part of the project after gaining somewhat widespread usage, something I'm both surprised by, but also very appreciative of people finding a small tool I wrote so useful & contributing their own ideas and time towards.

License

Code is under the BSD 2 Clause (NetBSD) license.

homebrew-autoupdate's People

Contributors

agross avatar bo98 avatar branchvincent avatar brewtestbot avatar buschtoens avatar danielcompton avatar dduugg avatar domt4 avatar emroch avatar erikw avatar ghazel avatar gromgit avatar issyl0 avatar killeroid avatar mikemcquaid avatar nandahkrishna avatar ndbroadbent avatar oguzhanmeteozturk avatar p-linnane avatar rafaelmiquelino avatar rylan12 avatar smitt14ua avatar swissbuechi avatar toobuntu avatar vtta avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.