98-remove_unwanted_packages 1.26 KB
Newer Older
1 2
#!/bin/sh

3 4
set -e

5 6 7 8 9 10
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:
11
#   - gcc-4.7-base (libstdc++6 depends on it)
12 13
#   - libgcc1 (vidalia depends on it)
#   - cpp, cpp-4.4 (big parts of GNOME depend on it)
14
apt-get --yes purge  \
15 16
   '^linux-kbuild-*' \
   '^linux-headers-*' \
17
   build-essential debhelper dkms dpatch dpkg-dev \
18
   gcc gcc-4.7 \
19
   intltool-debian \
20
   libc6-dev libgl1-mesa-dev libstdc++6-4.4-dev linux-libc-dev \
21 22 23
   make \
   module-assistant \
   po-debconf \
24
   virtualbox-guest-dkms
25

26 27 28
### Deinstall a few unwanted packages that were pulled by tasksel
### since they have Priority: standard.
apt-get --yes purge  \
29
   apt-listchanges at bsd-mailx dc debian-faq doc-debian \
30 31 32
   '^exim4*' ftp m4 mlocate ncurses-term nfs-common portmap procmail python-apt \
   python-reportbug reportbug telnet texinfo time w3m wamerican

33
### Deinstall some other unwanted packages.
34
apt-get --yes purge  \
35 36 37 38 39 40 41 42 43
    '^aptitude*' \
    db5.1-util \
    krb5-locales \
    live-build \
    locales \
    '^openssh-blacklist*' \
    rpcbind \
    tasksel \
    tasksel-data \
44 45

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