How To Update Bash Version On macOS

This article will tell you how to get the current macOS used bash version, how to update the bash version to a new version. It will also tell you how to fix the Error: Failed to download resource “bash” and Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed! during the new bash version installation.

1. How To Get The Current bash Version.

  1. Open a terminal and run the command bash –version to get the current bash version.
    $ bash --version
    GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
    Copyright (C) 2007 Free Software Foundation, Inc.
    

2. How To Install The Latest bash Version On macOS.

  1. Run the command brew install bash to install the latest bash version.
    $ brew install bash
    ==> Downloading https://homebrew.bintray.com/bottles/bash-5.1.4.catalina.bottle.tar.gz
    Warning: Transient problem: HTTP error Will retry in 1 seconds. 3 retries     
    Warning: left.
    Warning: Transient problem: HTTP error Will retry in 2 seconds. 2 retries     
    Warning: left.
    Warning: Transient problem: HTTP error Will retry in 4 seconds. 1 retries     
    Warning: left.
    -=O=-                #    #     #     #                                       
    curl: (22) The requested URL returned error: 502 Bad Gateway
    Error: Failed to download resource "bash"
    Download failed: https://homebrew.bintray.com/bottles/bash-5.1.4.catalina.bottle.tar.gz
    
  2. To fix the above issue, you can run the command brew update to update the homebrew.
    $ brew update
    Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
    Fetching /usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions failed!
    Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions failed!
    Fetching /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask failed!
    Fetching /usr/local/Homebrew failed!
    Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services failed!
    Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed!
  3. To fix the above error, you can run the command brew update-reset and then run the command source ~/.bash_profile to activate it.
    (base) songs-MacBook-Pro:Downloads songzhao$ brew update-reset
    ==> Fetching /usr/local/Homebrew...
    
    fatal: unable to access 'https://github.com/Homebrew/brew/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 
    fatal: unable to access 'https://github.com/Homebrew/brew/': Failed to connect to github.com port 443: Operation timed out
    
    ==> Resetting /usr/local/Homebrew...
    Branch 'master' set up to track remote branch 'master' from 'origin'.
    Switched to and reset branch 'master'
    Your branch is up to date with 'origin/master'.
    
    ==> Fetching /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...
    
    remote: Enumerating objects: 426029, done.
    remote: Counting objects: 100% (426029/426029), done.
    remote: Compressing objects: 100% (132148/132148), done.
    remote: Total 422626 (delta 296526), reused 415096 (delta 289105), pack-reused 0
    Receiving objects: 100% (422626/422626), 147.89 MiB | 5.30 MiB/s, done.
    Resolving deltas: 100% (296526/296526), completed with 2993 local objects.
    From https://github.com/caskroom/homebrew-cask
       6b6d4b75a3..e36481719f master     -> origin/master
     * [new tag]         0.1        -> 0.1
     * [new tag]         0.2        -> 0.2
     * [new tag]         0.3        -> 0.3
     * [new tag]         0.4        -> 0.4
     * [new tag]         0.5        -> 0.5
        ...
     * [new tag]         v0.7.0     -> v0.7.0
     * [new tag]         v0.8.0     -> v0.8.0
     * [new tag]         v0.9.0     -> v0.9.0
     * [new tag]         v0.9.1     -> v0.9.1
     * [new tag]         v0.9.2     -> v0.9.2
    
    ==> Resetting /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...
    Checking out files: 100% (4812/4812), done.
    Branch 'master' set up to track remote branch 'master' from 'origin'.
    Reset branch 'master'
    Your branch is up to date with 'origin/master'.
    
    ==> Fetching /usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions...
    fatal: unable to access 'https://github.com/caskroom/homebrew-versions/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 
    
    ==> Resetting /usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions...
    Branch 'master' set up to track remote branch 'master' from 'origin'.
    Reset branch 'master'
    Your branch is up to date with 'origin/master'.
    
    ==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
    fatal: unable to access 'https://github.com/Homebrew/homebrew-cask/': Failed to connect to github.com port 443: Operation timed out
    
    ==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
    Branch 'master' set up to track remote branch 'master' from 'origin'.
    Reset branch 'master'
    Your branch is up to date with 'origin/master'.
    
    ==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions...
    fatal: unable to access 'https://github.com/Homebrew/homebrew-cask-versions/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 
    fatal: unable to access 'https://github.com/Homebrew/homebrew-cask-versions/': Failed to connect to github.com port 443: Operation timed out
    
    ==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions...
    Branch 'master' set up to track remote branch 'master' from 'origin'.
    Reset branch 'master'
    Your branch is up to date with 'origin/master'.
    
    ==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
    fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': Failed to connect to github.com port 443: Operation timed out
    fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': Failed to connect to github.com port 443: Operation timed out
    
    ==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
    Branch 'master' set up to track remote branch 'master' from 'origin'.
    Reset branch 'master'
    Your branch is up to date with 'origin/master'.
    
    ==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
    remote: Enumerating objects: 482, done.
    remote: Counting objects: 100% (482/482), done.
    remote: Compressing objects: 100% (357/357), done.
    remote: Total 482 (delta 208), reused 306 (delta 113), pack-reused 0
    Receiving objects: 100% (482/482), 139.71 KiB | 394.00 KiB/s, done.
    Resolving deltas: 100% (208/208), completed with 4 local objects.
    From https://github.com/Homebrew/homebrew-services
       01ee811..e7d862e  master                    -> origin/master
     * [new branch]      fix/wrapper/timed_in_hash -> origin/fix/wrapper/timed_in_hash
    fatal: unable to access 'https://github.com/Homebrew/homebrew-services/': Failed to connect to github.com port 443: Operation timed out
    
    ==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
    Branch 'master' set up to track remote branch 'master' from 'origin'.
    Reset branch 'master'
    Your branch is up to date with 'origin/master'.
  4. Now you can run the command brew install bash again to install the bash latest version.
    $ brew install bash
    Updating Homebrew...
    ==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:0cb1cc7af109437fe0e020c9f3b7b95c3c709b140bde9f991ad2c1433496dd42
    ##################################################################################################################################################################### 100.0%
    ==> Pouring portable-ruby-2.6.8.yosemite.bottle.tar.gz
    ==> Auto-updated Homebrew!
    Updated 4 taps (homebrew/cask-versions, homebrew/core, homebrew/cask and caskroom/versions).
    ==> New Formulae
    abi-compliance-checker            dory                              kickstart                         openj9                            seaweedfs
    abi-dumper                        dotbot                            klee                              openliberty-jakartaee8            selene
    abricate                          drill                             kn                                openliberty-jakartaee9            seqkit
    actionlint                        dtm                               kube-score                        openliberty-microprofile4         sevenzip
    age                               dua-cli                           kubeconform                       openliberty-webprofile8           sextractor
    airspyhf                          dynomite                          kubernetes-cli@1.22               openliberty-webprofile9           sigrok-cli
    alda                              ehco                              kubeval                           openmodelica                      simde
    alembic                           eigenpy                           lastz                             opensearch                        singularity
    alerter                           elan-init                         ld-find-code-refs                 opensearch-dashboards             six
    all-repos                         elfutils                          leaf-proxy                        openssl@3                         slides
    amfora                            enkits                            lefthook                          oras                              slirp4netns
    ansilove                          enzyme                            lexbor                            orgalorg                          smu
    apache-pulsar                     epr                               libaec                            organize-tool                     smug
    apt                               erlang@23                         libavif                           osc-cli                           sniffer
    archey4                           esbuild                           libfuse@2                         osinfo-db                         snowpack
    argocd-autopilot                  etcd-cpp-apiv3                    libgrape-lite                     osinfo-db-tools                   soapyrtlsdr
    argocd-vault-plugin               f2                                libmng                            ots                               soapysdr
    artillery                         fabric-installer                  libmobi                           pam-reattach                      solana
    as-tree                           fann                              libnghttp2                        pandoc-plot                       solargraph
    at-spi2-atk                       fanyi                             librespot                         pari-elldata                      spaceship
    at-spi2-core                      fastfec                           librist                           pari-galdata                      spdx-sbom-generator
    atmos                             fastp                             libsigrok                         pari-galpol                       spectra
    atop                              fastq-tools                       libsigrokdecode                   pari-seadata                      spirv-llvm-translator
    atuin                             fcp                               libsoup@2                         pari-seadata-big                  spot
    autoconf@2.69                     feroxbuster                       libunwind                         parquet-cli                       sql-lint
    autorestic                        fheroes2                          libxls                            payload-dumper-go                 sqlancer
    avahi                             firefoxpwa                        licensefinder                     pcp                               sqlbench
    aws-sso-util                      fisher                            lighthouse                        pdf2djvu                          sqlfluff
    aws-vault                         flamebearer                       lilypond                          pgxnclient                        sqlx-cli
    baidupcs-go                       fluid-synth@2.1                   lima                              php-cs-fixer@2                    sqsmover
    bash-language-server              fnlfmt                            linux-headers@4.15                php@8.0                           statix
    bash_unit                         frum                              linux-pam                         phpbrew                           storj-uplink
    basis_universal                   fst                               liqoctl                           pillow                            stp
    bat-extras                        func-e                            lit                               pip-audit                         stylua
    bbtools                           fuse-overlayfs                    llvm@11                           pip-tools                         svgbob
    bgpq4                             fypp                              llvm@12                           pkg-config-wrapper                swiftplantuml
    biber                             g2o                               lm-sensors                        pkgconf                           symengine
    bioperl                           gcc@10                            locust                            plow                              sysstat
    bosh-cli                          ghostunnel                        lsix                              pocsuite3                         systemd
    bottom                            git-branchless                    lttng-ust                         poppler-qt5                       tailscale
    brigade-cli                       git-cliff                         lua-language-server               postgresql@13                     tbb@2020
    brook                             git-credential-libsecret          luau                              principalmapper                   teku
    btop                              git-svn                           lunzip                            procps                            terminator
    bubblewrap                        git-xargs                         ly                                proj@7                            terraform-rover
    buildpulse-test-reporter          gitbackup                         lychee                            psalm                             texlive
    bupstash                          gitlab-ci-local                   lziprecover                       pure                              tfk8s
    ca-certificates                   gitwatch                          macchina                          px                                tfmigrate
    cadence-workflow                  glibc                             macos-term-size                   py-spy                            tfproviderlint
    cadical                           gnupg@2.2                         mailcatcher                       pydocstyle                        tfupdate
    caire                             go-boring                         mapcidr                           pyflow                            threemux
    cargo-bloat                       go-critic                         marcli                            pyoxidizer                        tilt
    cargo-llvm-lines                  go@1.16                           mariadb@10.5                      pyqt-3d                           timg
    cargo-outdated                    goawk                             marp-cli                          pyqt-builder                      tmuxp
    cassandra@3                       gomodifytags                      mathlibtools                      pyqt-networkauth                  tomcat@9
    cava                              gopass-jsonapi                    matterbridge                      pyright                           toml11
    cgif                              goplus                            maturin                           python-launcher                   tracker
    charmcraft                        goproxy                           mbedtls@2                         python-tabulate                   trojan-go
    chroma                            gotests                           mcfly                             python-tk@3.10                    tsduck
    chrpath                           gotify                            mdzk                              python-tk@3.9                     tssh
    cidr2range                        gpg-tui                           microsocks                        python@3.10                       twty
    cilium-cli                        gradle@6                          mimalloc                          pythran                           tz
    ciphey                            grafana-agent                     minisat                           pywhat                            uftrace
    clang-format@11                   graphqurl                         mist                              qodem                             umple
    clarinet                          grepip                            mmtabbarview                      qt-libiodbc                       universal-ctags
    clazy                             gtksourceview5                    moar                              qt-mariadb                        urlwatch
    clickhouse-cpp                    gtop                              mold                              qt-mysql                          uuu
    clickhouse-odbc                   h2c                               mongocli                          qt-percona-server                 vala-language-server
    cloudiscovery                     haruhi-dl                         mongosh                           qt-postgresql                     vespa-cli
    clusterctl                        haskell-language-server           moto                              qt-unixodbc                       viddy
    cmake-docs                        hcl2json                          mrbayes                           qthreads                          virtualenv
    code-minimap                      himalaya                          msgpack-cxx                       qwt-qt5                           virtualenvwrapper
    colima                            htmlq                             mt32emu                           range2cidr                        vite
    conftest                          hubble                            multi-git-status                  rbw                               viu
    conmon                            hurl                              multitime                         red-tldr                          vtable-dumper
    copier                            i2c-tools                         murex                             regula                            vue-cli
    corepack                          iconsur                           mx                                reproc                            wasmtime
    cosign                            imap-backup                       nanoflann                         revive                            waypoint
    coursier                          imath                             nbsdgames                         rhit                              webhook
    cppzmq                            influxdb-cli                      ncc                               rizin                             west
    cpufetch                          influxdb@1                        ncnn                              rmw                               wildmidi
    crackpkcs                         ipinfo-cli                        neovim-qt                         rollup                            wllvm
    cri-tools                         iproute2                          neovim-remote                     ronn                              xauth
    cruft                             iputils                           nerdctl                           rosa-cli                          xfig
    crun                              iredis                            net-tools                         rover                             xplr
    csvtk                             isa-l                             newrelic-infra-agent              rpg-cli                           xray
    cue                               java-service-wrapper              node@16                           rpki-client                       xsel
    cyral-gimme-db-token              jello                             nomino                            rsc_2fa                           yaml-language-server
    darglint                          jellyfish                         notcurses                         rune                              youtubeuploader
    datafusion                        joplin-cli                        nox                               rustfmt                           yt-dlp
    datree                            jpdfbookmarks                     ns-3                              s4cmd                             zellij
    ddcctl                            jrsonnet                          nsh                               sail                              zet
    demumble                          jsonschema                        numactl                           salt-lint                         zinit
    detect-secrets                    julia                             obfs4proxy                        samba                             zlib-ng
    djhtml                            k2tf                              oksh                              scorecard                         zsh-fast-syntax-highlighting
    djl-serving                       kalker                            onedrive                          scotch                            zsh-vi-mode
    doc8                              kertish-dfs                       openexr@2                         scry
    docuum                            ki                                openfpgaloader                    search-that-hash
    ==> Updated Formulae
    Updated 5326 formulae.
    ==> Renamed Formulae
    badtouch -> authoscope                                    kde-ki18n -> ki18n                                        pyqt5 -> pyqt@5
    envoy@1.17 -> envoy@1.18                                  kde-threadweaver -> threadweaver                          rt-audio -> rtaudio
    fcct -> butane                                            libsasl2 -> cyrus-sasl                                    selenium-server-standalone -> selenium-server
    grakn -> typedb                                           linux-headers -> linux-headers@4.4                        weboob -> woob
    kafkacat -> kcat                                          minizip2 -> minizip-ng                                    wxmac -> wxwidgets
    kde-extra-cmake-modules -> extra-cmake-modules            mr2 -> zoro                                               wxmac@3.0 -> wxwidgets@3.0
    kde-karchive -> karchive                                  parallelstl -> onedpl
    kde-kdoctools -> kdoctools                                prestosql -> trino
    ==> Deleted Formulae
    amap                              dshb                              henplus                           marst                             srmio
    ape                               eject                             httptunnel                        mboxgrep                          svdlibc
    appledoc                          erlang@20                         jerasure                          md                                swiftplate
    atlassian-cli                     es                                kakasi                            namazu                            terraform-provisioner-ansible
    aurora-cli                        eventlog                          l-smash                           ocamlsdl                          tj
    balance                           exomizer                          libbind                           osquery                           torrentcheck
    bbcolors                          flasm                             liberasurecode                    pandoc-citeproc                   udns
    boost@1.57                        fondu                             libinfinity                       postmark                          vavrdiasm
    boost@1.60                        gconf                             libmill                           procyon-decompiler                whitedb
    colorsvn                          gcore                             libopendkim                       protobuf-swift                    whohas
    contacts                          gf-complete                       libpuzzle                         protobuf@3.7                      xidel
    csv-fix                           git-hooks                         libvbucket                        redsocks                          xtail
    dlite                             git-sh                            m2c                               sdhash                            zdelta
    dnsrend                           giter8                            magnetix                          shorten
    drip                              hardlink-osx                      makepp                            soundpipe
    ==> New Casks
    8x8-work                          defold-beta                       immersed                          northernspysoftware-colorpicker   soundtoys
    ableton-live-intro10              defold-beta                       infra                             notch-simulator                   spaceid
    ableton-live-lite10               depthmapx                         inso                              notunes                           sparrow
    ableton-live-standard10           devbook                           inso-beta                         nudge                             specter
    ableton-live-suite10              devilutionx                       inso-beta                         odbc-manager                      sqlcl
    actual                            devkinsta                         insomnia-alpha                    offset-explorer                   sqlight
    adguard-vpn                       diagnostics                       insomnia-alpha                    old-school-runescape              stork
    adrive                            dingtalk-lite                     instatus-out                      olympus                           supermjograph
    affinity-designer                 discord-development               internxt-drive                    only-switch                       suuntodm5
    affinity-photo                    discord-development               invoker                           open-video-downloader             swiftbar
    affinity-publisher                disk-diet                         irpf2021                          openloco                          swiftplantumlapp
    airbuddy                          disk-expert                       isyncer                           optimus-player                    tabby
    alipay-development-assistant      djl-bench                         itraffic                          otto-matic                        tablecruncher
    almighty                          dmidiplayer                       izotope-product-portal            p4                                tabtopus
    android-commandlinetools          dockview                          jamkazam                          pd-runner                         teamspeak-client
    ankama                            dropbox-capture                   jellyfin-media-player             pdfify                            telegram-desktop-beta
    appflowy                          dropzone                          jgrennison-openttd                pensela                           telegram-desktop-beta
    appium-inspector                  drovio                            jiohome                           physics-101                       temurin
    arduino-ide-beta                  duplicate-file-finder             jpadilla-rabbitmq                 pichon                            temurin11
    arduino-ide-beta                  ears                              jpadilla-redis                    picoscope-beta                    temurin11
    arduino-ide-nightly               emmetapp                          jt-bridge                         picoscope-beta                    temurin8
    arduino-ide-nightly               enclave                           jupyterlab                        pktriot                           temurin8
    arkiwi                            enigma                            kaleidoscope2                     plasticscm-cloud-edition          tentacle-sync-studio
    around                            epilogue-operator                 kaleidoscope2                     playcover                         tev
    asana                             equinox                           katrain                           plistedplus                       textsniper
    assinador-serpro                  fabfilter-micro                   kdocs                             podpisuj                          thetimemachinemechanic
    audacity                          fabfilter-one                     kdrive                            polkadot-js                       threema
    audius                            fabfilter-pro-c                   keyboardholder                    pop                               tic80
    avtouchbar                        fabfilter-pro-ds                  keycombiner                       portx                             tidelift
    azirevpn                          fabfilter-pro-g                   keyman                            postgres-unofficial               tidgi
    battery-buddy                     fabfilter-pro-l                   kubenav                           ppsspp                            tint
    beeper                            fabfilter-pro-mb                  lagrange                          prisma-studio                     tinymediamanager3
    bespoke                           fabfilter-pro-q                   landrop                           privadovpn                        tinymediamanager3
    betelguese                        fabfilter-pro-r                   leapp                             privileges                        todoist
    betterdiscord-installer           fabfilter-saturn                  letter-opener                     projector                         toland-qlmarkdown
    betterdummy                       fabfilter-simplon                 librewolf                         pronterface                       topnotch
    biglybt                           fabfilter-timeless                linearmouse                       pulse                             touch-portal
    billings-pro                      fabfilter-twin                    live-home-3d                      pure-writer                       touchosc
    bit-fiddle                        fabfilter-volcano                 local-beta                        qq-beta                           trackerzapper
    black-ink                         far2l                             logseq                            qth                               transfer
    blackhole-64ch                    fastmarks                         ludwig                            qudedup-extract-tool              trezor-suite
    blender-benchmark                 fig                               lycheeslicer                      radar                             ubports-installer
    blobsaver                         final-fantasy-xiv-online          maccleaner-pro                    rancher                           ultracopier
    blockbench                        finalshell                        macfuse-dev                       recut                             unexpectedly
    breitbandmessung                  finisher-voodoo                   macfuse-dev                       redis-pro                         uniflash
    buckets                           firefly                           macloggerdx                       remarkable                        unipro-ugene
    buckets-beta                      firmaec                           macloggerdx-beta                  remix-ide                         universal-battle
    buckets-beta                      flacon                            macloggerdx-beta                  remnote                           universal-gcode-platform
    bugdom                            flameshot                         macmorpheus                       remotehamradio                    usbimager
    burp-suite-professional           flomo                             macrorecorder                     remotion                          usr-sse2-rdm
    calmly-writer                     fluent-reader                     macstroke                         replacicon                        utterly
    carbon-copy-cloner5               fmail                             maestral                          revolver-office                   uvtools
    carbon-copy-cloner5               folder-colorizer                  magicplot                         ricochet-refresh                  vale-server
    castr                             foobar2000                        mambaforge                        royal-tsx-beta                    valkyrie
    celestia                          fork-dev                          mana-security                     royal-tsx-beta                    vamiga
    centered                          fork-dev                          mathcha-notebook                  runelite                          veepn
    chatterino                        fotokasten                        maxon                             safe-exam-browser                 vial
    chia                              foxglove-studio                   mds                               safe-multisig                     videoduke
    cinc-workstation                  fpc-laz                           megazeux                          samsung-dex                       vitals
    cinderella                        fpc-src-laz                       mem                               scatter                           vitalsigns
    cirrus                            free42-binary                     memory-cleaner                    schildichat                       vlc-setup
    citra-nightly                     free42-decimal                    menu-bar-splitter                 sdm                               volanta
    citra-nightly                     fs-uae-launcher                   menuwhere                         semeru-jdk-open                   volley
    citrix-workspace                  futurerestore-gui                 microsoft-openjdk                 semeru-jdk11-open                 vpn-tracker-365
    clashx-pro                        fxfactory                         microsoft-openjdk11               semeru-jdk11-open                 vsd-viewer
    classroom-mode-for-minecraft      gaphor                            microsoft-openjdk11               semeru-jdk8-open                  vsdx-annotator
    clay                              gcs                               microsoft-remote-desktop          semeru-jdk8-open                  vym
    clips-ide                         geogebra5                         midi-router-client                shapr3d                           waltr-heic-converter
    clock-signal                      geogebra5                         midiview                          shield                            waltr-pro
    cloudash                          gitdock                           mightymike                        shimonote                         wezterm
    coarchi                           goldenpassport                    millie                            shortcutor                        whatsapp-beta
    code-composer-studio              goneovim                          mimestream                        shortery                          whatsapp-beta
    codeql                            google-assistant                  mixed-in-key                      shottr                            wifi-explorer-pro
    coffitivity-offline               google-chat-electron              moebius                           sigmaos                           wing-personal
    coinomi-wallet                    gosign                            monterey-cache-cleaner            simplelink-msp432-sdk             wolai
    command-pad                       grammarly-desktop                 moradownloader                    simtoolkitpro                     wondershare-edrawmax
    crescendo                         gridtracker                       mumble-snapshot                   sioyek                            wsjtx
    cron                              guilded                           mumble-snapshot                   sitala                            wxmacmolplt
    cryptonomic-galleon               hancom-word                       mural                             siyuan                            xampp7
    dash5                             handyprintpro                     mutesync                          sleek                             xbar
    datasette                         hightop                           mweb-pro                          slidepilot                        xstation5
    dataspell                         hook                              n1ghtshade                        smplayer                          yippy
    deadbeef-nightly                  hush                              nanosaur                          sonic-robo-blast-2                zebra2
    deepnest                          hydrus-network                    netnewswire-beta                  sonic-robo-blast-2-kart           zulu15
    defold                            hyperkey                          nimblenote                        sonic3air
    defold-alpha                      iconscout                         nordlocker                        sonobus
    defold-alpha                      ilspy                             nordpass                          soothe2
    ==> Updated Casks
    Updated 3058 casks.
    ==> Deleted Casks
    3cxphone                                   flash-player                               mapillary-uploader                         scrutiny
    adafruit-arduino                           flash-player-debugger                      masterway-note                             shoes
    adobe-air-sdk                              flash-player-debugger-npapi                meshcommander                              sigilium-email-signatures
    adobe-lens-profile-creator                 flash-player-debugger-ppapi                microsoft-lync                             sigviewer
    adventure                                  flash-ppapi                                microsoft-r-open                           silverlight
    adware-removal-tool                        flashlighttool                             mist                                       skreenics
    agfeo-dashboard                            flow-e                                     modulair                                   smallpdf
    air-connect                                fluxcenter                                 molsoftbrowser                             spectrum
    aja-system-test                            fm3-edit                                   monitorearth                               spectx
    anka-build-cloud-registry                  foreman                                    mp3tag                                     spek
    anytrans                                   fpcsrc                                     mweb                                       spideroak-share
    anytrans-for-android                       fraise                                     napari                                     squadanimatorgaa
    anzeigenchef                               freeter                                    netbeans-cpp                               squadanimatorrugby
    appstudio                                  fritzing                                   netbeans-java-ee                           squadanimatorsoccer
    arduino-beta                               gameshow                                   netbeans-java-se                           stageplotpro
    armitage                                   geotagger                                  netbeans-php                               stashcat
    asc-timetables                             gitbook                                    nndd                                       strange-flesh
    audiobookbinder                            gitbox                                     noraswitch                                 superbeam
    auristor-client                            globalmeet                                 nosqlclient                                swift-explorer
    aurora                                     google-backup-and-sync                     obyte                                      tbe
    avast-secureline-vpn                       google-photos-backup-and-sync              octoscreen                                 tbs-studio
    axe-edit-iii                               hackhands                                  omniweb                                    tcl
    axe-electrum                               handbrake-nightly                          open-ecard                                 teamwire
    baiducloud                                 handbrake-nightly                          opennx                                     telegram-desktop-dev
    battery-guardian                           hands-off                                  opera-mail                                 telegram-desktop-dev
    bearychat                                  handylock                                  otter-browser                              terminus
    beatport-pro                               harvest                                    outwit-hub                                 thetube
    beautune                                   hbuilder                                   pastor                                     tidepool-uploader
    beoplay-software-update                    hessenbox-da                               pdftotext                                  tla-plus-toolbox-nightly
    bigsur-cache-cleaner                       hex                                        phocus                                     tla-plus-toolbox-nightly
    blooo                                      hex-fiend-beta                             phonebrowse                                tmnotifier
    blue-jeans-browser-plugin                  hubic                                      phoneclean                                 todos
    boonzi                                     imarisviewer                               phonerescue                                touch-bar-pong
    breakaway                                  imazing-mini                               phonetrans                                 tracks-live
    caramba-switcher                           imitone                                    pibakery                                   transmit-disk
    cellery                                    imobie-m1-app-checker                      platelet                                   transtype
    chameleon-ssd-optimizer                    inboard                                    playnow                                    trufont
    chocolat                                   insomnia-designer                          plecs-standalone                           tuntap
    clipbuddy                                  instant-articles-builder                   pluralsight                                uberconference
    cliqz                                      instasizer                                 pomolectron                                uc-one
    collabshot                                 inxmail-professional                       postgres                                   unity-appletv-support-for-editor
    colormunki-photo                           iograph                                    postgres-beta                              unity-download-assistant
    comparemerge                               iridient-developer                         postgres-beta                              unity-linux-il2cpp-support-for-editor
    craft                                      itrash                                     printrun                                   unity-linux-support-for-editor
    cricut-design-space                        ivideonclient                              privatus                                   unity-lumin-support-for-editor
    crypt                                      jabt-flow                                  pro-fit                                    unity-macos-il2cpp-support-for-editor
    cuteclips                                  jaksta-media-recorder                      psequel                                    unity-standard-assets
    cytoscape                                  jalbum                                     pullover                                   unity-web-player
    darktable-dev                              jira-client                                punto-switcher                             upic
    darktable-dev                              juicebar                                   qit                                        use-engine
    deadbeef                                   kafka-tool                                 qqbrowser                                  utox
    delayedlauncher                            kap-beta                                   qtum                                       vectr
    dissenter-browser                          kap-beta                                   qtvlm                                      veonim
    dnagedcom-beta                             kitematic0176                              quickkeyextension                          videobox
    domainbrain                                kk7ds-python-runtime                       qyooo                                      visicut
    dragthing                                  lektor                                     rabbitmq                                   vivi
    drama                                      lelivrescolairefr                          raven                                      vrep
    duckstation                                linein                                     rcloneosx                                  wakeonlan
    dukto                                      lingo                                      redis                                      wanna
    duoshao                                    littlesecrets                              refined-github-safari                      wavtap
    eaccess                                    livereload                                 resxtreme                                  wercker-cli
    edrawmax                                   locklizard-safeguard-viewer                revisions                                  windocd
    elgiganten-jotta                           loni-pipeline                              river-sparkle                              wingpersonal
    eudic-es                                   macclean                                   rpvoip                                     wraparound
    everweb                                    macintosh-explorer                         rss                                        xamarin
    evolve-ip-uc-one                           magic-launch                               rubitrack-pro                              xlink-kai
    family-tree-builder                        magicplotpro                               s3stat-setup                               zbuc-imgur
    filedrop                                   magicplotstudent                           screen                                     zipcleaner
    flash-npapi                                magicprefs                                 scrooo
    
    ==> Downloading https://ghcr.io/v2/homebrew/core/bash/manifests/5.1.12
    ######################################################################## 100.0%
    ==> Downloading https://ghcr.io/v2/homebrew/core/bash/blobs/sha256:9d7a6291718a37b1ac83457eafbbbcbe76d2b233d70dd07b90a4d1d726479054
    ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:9d7a6291718a37b1ac83457eafbbbcbe76d2b233d70dd07b90a4d1d726479054?se=2022-01-02T03%3A30%
    ######################################################################## 100.0%
    ==> Pouring bash--5.1.12.catalina.bottle.tar.gz
    🍺  /usr/local/Cellar/bash/5.1.12: 157 files, 10.9MB
    ==> `brew cleanup` has not been run in the last 30 days, running now...
    Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
    Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
    Removing: /Users/songzhao/Library/Caches/Homebrew/geckodriver--0.29.0.catalina.bottle.tar.gz... (2MB)
    Removing: /Users/songzhao/Library/Caches/Homebrew/gettext--0.21.catalina.bottle.tar.gz... (8.5MB)
    Removing: /Users/songzhao/Library/Caches/Homebrew/icu4c--68.2.catalina.bottle.tar.gz... (27.1MB)
    Removing: /Users/songzhao/Library/Caches/Homebrew/maven--3.6.3.tar.gz... (9MB)
    Removing: /Users/songzhao/Library/Caches/Homebrew/node--15.11.0.catalina.bottle.tar.gz... (15.5MB)
    Removing: /Users/songzhao/Library/Caches/Homebrew/ntfs-3g--2017.3.23_3.catalina.bottle.1.tar.gz... (764.6KB)
    Removing: /Users/songzhao/Library/Caches/Homebrew/openjdk--15.0.2.catalina.bottle.tar.gz... (190.9MB)
    Removing: /Users/songzhao/Library/Caches/Homebrew/tomcat--9.0.43.tar.gz... (11.0MB)
    Removing: /Users/songzhao/Library/Caches/Homebrew/tree--1.8.0.catalina.bottle.tar.gz... (49.5KB)
    Removing: /Users/songzhao/Library/Logs/Homebrew/ntfs-3g... (64B)
    Removing: /Users/songzhao/Library/Logs/Homebrew/gettext... (64B)
    Removing: /Users/songzhao/Library/Logs/Homebrew/node... (64B)
    Pruned 1 symbolic links from /usr/local
  5. Now run the command bash –version again, you can see that the bash has the latest version.
    $ bash --version
    GNU bash, version 5.1.12(1)-release (x86_64-apple-darwin19.6.0)
    Copyright (C) 2020 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    
    This is free software; you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    

3. How To Set The Default bash Version.

  1. Run the command which -a bash to get all the installed bash version lists.
    $ which -a bash
    /usr/local/bin/bash
    /bin/bash
  2. There are 2 bash versions from the above list.
    $ /usr/local/bin/bash --version
    GNU bash, version 5.1.12(1)-release (x86_64-apple-darwin19.6.0)
    Copyright (C) 2020 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    
    This is free software; you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    (base) songs-MacBook-Pro:Downloads songzhao$ 
    
    (base) songs-MacBook-Pro:Downloads songzhao$ /bin/bash --version
    GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
    Copyright (C) 2007 Free Software Foundation, Inc.
  3. Run the command cd ~ to go to the user home directory.
  4. Edit the .bash_profile file, add /usr/local/bin/bash to the PATH environment variable.
    PATH="/usr/local/bin/bash:${PATH}"
    export PATH
  5. Run the command source .bash_profile to activate it.

1 thought on “How To Update Bash Version On macOS”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.