summaryrefslogtreecommitdiff
path: root/FlightComputerNotes.mdwn
blob: c3a77e7795b985e1df2b5581391913544b94e017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Cleanup scripts

`/etc/apt/apt.conf.d/90local-tiny`:

    Dir::Cache {
        pkgcache "";
        srcpkgcache "";
    }
    DPkg::Post-Invoke {"/usr/local/sbin/cleanup";}

`/usr/local/sbin/cleanup`:

    #!/bin/bash
    apt-get clean
    dpkg --clear-avail
    rm -rf /usr/share/{doc,info,locale,man,lintian/overrides}/*
    rm -rf /usr/doc/* /usr/lib/gconv/*
    rm -f /var/lib/dpkg/info/*.md5sums
    Z=/usr/share/zoneinfo
    find $Z -not -type d -not -path $Z -not -path $Z/UTC -not -path $Z/localtime \
            -not -path "`readlink /etc/localtime`" -print0 | xargs -0 rm -f
    find $Z -type d -empty -print0 | xargs -0r rmdir
    # For pci.ids: ssh root@lv2 lspci -x | lspci -F /dev/stdin
    rm -f /var/lib/dpkg/*-old /var/cache/debconf/*-old /usr/share/misc/pci.ids
    echo "NOTE: if done with apt, run apt-list-cleanup."

`/usr/local/sbin/apt-list-cleanup`:

    #!/bin/bash
    rm -f /var/lib/apt/lists/*{Packages,Release}
    echo "Done. You will need to run apt-get update next time you want to use apt."