summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-hooks/98-remove_unwanted_packages
blob: 13e2a0ebab529073dd91aa0b681ccdbe49652137 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh

set -e

echo "Removing unwanted packages"

### Deinstall dev packages.

# We use apt-get as aptitude doesn't know about globs.
# There are packages we could be tempted to remove but we can't:
#   - gcc-*-base (libstdc++6 depends on it)
#   - libgcc1 (apt depends on it)
#   - cpp, cpp-* (big parts of GNOME depend on it)
apt-get --yes purge  \
   '^linux-compiler-*' \
   '^linux-kbuild-*' \
   debhelper dpkg-dev \
   gcc gcc-6 \
   intltool-debian \
   libc6-dev \
   libelf-dev \
   linux-libc-dev \
   make \
   po-debconf \
   rsyslog \
   libdvdcss-dev

### Deinstall a few unwanted packages that were pulled by tasksel
### since they have Priority: standard.
apt-get --yes purge  \
   apt-listchanges \
   debian-faq \
   doc-debian \
   '^exim4*' \
   m4 \
   mlocate \
   ncurses-term \
   nfs-common \
   procmail \
   python3-reportbug \
   reportbug \
   telnet \
   texinfo \
   wamerican

### Deinstall some other unwanted packages.
apt-get --yes purge  \
    '^aptitude*' \
    '^geoclue*' \
    krb5-locales \
    libdvdcss2-dbgsym \
    live-build \
    locales \
    rpcbind \
    tasksel \
    tasksel-data \
    tcpd

### Deinstall dependencies of the just removed packages.
apt-get --yes --purge autoremove