snipt

Ctrl+h for KB shortcuts

Bash

workaround failed 'brew update'

1
2
3
4
cd `brew --prefix`
git remote add origin https://github.com/mxcl/homebrew.git
git fetch origin
git reset --hard origin/master
https://snipt.net/embed/950cad4515e75bcf1279170f5214aba4/
/raw/950cad4515e75bcf1279170f5214aba4/
950cad4515e75bcf1279170f5214aba4
bash
Bash
4
2019-06-21T09:37:41
True
False
False
Jan 17, 2014 at 03:28 AM
/api/public/snipt/106483/
workaround-failed-brew-update
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nb">cd</span> <span class="sb">`</span>brew --prefix<span class="sb">`</span> </span><span id="L-2"><a name="L-2"></a>git remote add origin https://github.com/mxcl/homebrew.git </span><span id="L-3"><a name="L-3"></a>git fetch origin </span><span id="L-4"><a name="L-4"></a>git reset --hard origin/master </span></pre></div> </td></tr></table>
bash, brew, git

Bash

Show me 30 brew home pages at a time.

for i in `brew search | sed -n 30,60p` ;do brew home $i; done
https://snipt.net/embed/ead4475ee1ad79bfc0637d376c8a18e0/
/raw/ead4475ee1ad79bfc0637d376c8a18e0/
ead4475ee1ad79bfc0637d376c8a18e0
bash
Bash
1
2019-06-19T02:48:19
True
False
False
/api/public/snipt/30550/
show-me-30-brew-home-pages-at-a-time
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">for</span> i in <span class="sb">`</span>brew search <span class="p">|</span> sed -n 30,60p<span class="sb">`</span> <span class="p">;</span><span class="k">do</span> brew home <span class="nv">$i</span><span class="p">;</span> <span class="k">done</span> </span></pre></div> </td></tr></table>
"browse formulae", brew, homebrew, osx, show

Bash

uninstall homebrew

1
2
3
4
5
6
7
8
cd `brew --prefix`
rm -rf Cellar
brew prune
rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew
rm -rf ~/Library/Caches/Homebrew

---
This should also revert your /usr/local folder to its pre-Homebrew days. See the Homebrew installation wiki (http://github.com/mxcl/homebrew/wiki/installation) for more information.
https://snipt.net/embed/aa127681f8fc01ce04f79700a93d81d4/
/raw/aa127681f8fc01ce04f79700a93d81d4/
aa127681f8fc01ce04f79700a93d81d4
bash
Bash
8
2019-06-24T16:43:47
True
False
False
/api/public/snipt/29855/
uninstall-homebrew
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nb">cd</span> <span class="sb">`</span>brew --prefix<span class="sb">`</span> </span><span id="L-2"><a name="L-2"></a>rm -rf Cellar </span><span id="L-3"><a name="L-3"></a>brew prune </span><span id="L-4"><a name="L-4"></a>rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew </span><span id="L-5"><a name="L-5"></a>rm -rf ~/Library/Caches/Homebrew </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a>--- </span><span id="L-8"><a name="L-8"></a>This should also revert your /usr/local folder to its pre-Homebrew days. See the Homebrew installation wiki <span class="o">(</span>http://github.com/mxcl/homebrew/wiki/installation<span class="o">)</span> <span class="k">for</span> more information. </span></pre></div> </td></tr></table>
"os x", brew, homebrew, uninstall