Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

Bash

Fix broken packages in Ubuntu and Debian

1
2
3
4
5
6
7
8
dpkg --configure -a
apt-get install -f

# If the problem of a broken package still exist, the solution is to edit the dpkg status file manually.

nano /var/lib/dpkg/status

# Locate the corrupt package, and remove the whole block of information about it and save the file.
https://snipt.net/embed/c909f1463882443c12d770afa20dd0d1/
https://snipt.net/raw/c909f1463882443c12d770afa20dd0d1/
c909f1463882443c12d770afa20dd0d1
bash
Bash
8
2016-12-04T22:28:52
True
False
False
Dec 04, 2013 at 02:34 AM
/api/public/snipt/98414/
fix-broken-packages-in-ubuntu-and-debian
<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>dpkg --configure -a </span><span id="L-2"><a name="L-2"></a>apt-get install -f </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="c1"># If the problem of a broken package still exist, the solution is to edit the dpkg status file manually.</span> </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a>nano /var/lib/dpkg/status </span><span id="L-7"><a name="L-7"></a> </span><span id="L-8"><a name="L-8"></a><span class="c1"># Locate the corrupt package, and remove the whole block of information about it and save the file.</span> </span></pre></div> </td></tr></table>
apt, broken, debian, dpkg, fix, packages, status, ubuntu

Bash

Show recently installed or removed packages on Debian-based distros

awk '$3 ~ /install|remove/ {print $1 " "$3 ": "$4}' /var/log/dpkg.log
https://snipt.net/embed/10e467dce45be02443a441870d3f2add/
https://snipt.net/raw/10e467dce45be02443a441870d3f2add/
10e467dce45be02443a441870d3f2add
bash
Bash
1
2016-12-05T06:01:04
True
False
False
/api/public/snipt/36840/
show-recently-installed-or-removed-packages-on-debian-based-distros
<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>awk <span class="s1">&#39;$3 ~ /install|remove/ {print $1 &quot; &quot;$3 &quot;: &quot;$4}&#39;</span> /var/log/dpkg.log </span></pre></div> </td></tr></table>
awk, debian, dpkg, ubuntu
Copyrighted, illegal, or inappropriate content? Email [email protected].