This file is indexed.

prerm is in dash 0.5.7-2ubuntu2.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
#!/bin/sh
#
# pre-removal script for the Debian GNU/Linux ash package
#
# $Id: dash.prerm,v 1.2 2003/09/03 10:42:08 herbert Exp $

set -e

remove_divert() {
	diverter=$(dpkg-divert --listpackage $1)
	if [ "$diverter" = "dash" ]; then
		dpkg-divert --package dash --rename --remove $1
	fi
}

remove_shell() {
	if ! type remove-shell > /dev/null 2>&1; then
		return
	fi

	remove-shell /bin/dash
}

if [ "$1" = remove ] || [ "$1" = deconfigure ]; then
	remove_divert /bin/sh
	remove_divert /usr/share/man/man1/sh.1.gz
fi

if [ "$1" = remove ]; then
	remove_shell
fi