summaryrefslogtreecommitdiff
path: root/data/live-build-config/hooks/live/80-delete-docs.chroot
blob: 1f50a9ec5c8c027306136bf2434806cb4dd441d4 (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
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash

# Delete various unused files and directories in order free some space and shrink imagesize.

# We do not need any documentation on the system.
# Copyright/licenses files are ignored for deletion.
shopt -s extglob
rm -rf /usr/share/doc/*/!(copyright*|README*) /usr/share/doc-base

# We do not need any manpages on the system since man-binary is missing.
rm -rf /usr/local/man
rm -rf /usr/local/share/man
rm -rf /usr/share/man

# We do not need any games on the system.
rm -rf /usr/games
rm -rf /usr/local/games

# We do not need any caches on the system (will be recreated when needed).
rm -rf /var/cache/*

# We do not need any log-files on the system (will be recreated when needed).
rm -rf /var/log/alternatives.log
rm -rf /var/log/bootstrap.log
rm -rf /var/log/dpkg.log
rm -rf /var/log/apt/history.log
rm -rf /var/log/apt/term.log
rm -rf /var/log/nginx/access.log
rm -rf /var/log/nginx/error.log
rm -rf /var/log/squidguard/squidGuard.log
rm -rf /var/log/stunnel4/stunnel.log

# We do not need any backup-files on the system.
rm -rf /etc/sudoers.bak
rm -rf /etc/xml/catalog.old
rm -rf /etc/xml/polkitd.xml.old
rm -rf /etc/xml/xml-core.xml.old
rm -rf /root/.gnupg/pubring.kbx~
rm -rf /var/lib/dpkg/diversions-old
rm -rf /var/lib/dpkg/status-old
rm -rf /var/lib/sgml-base/supercatalog.old