Linux

Howto remove orphan packages in Ubuntu

There is usually some orphan packages left on the system after upgrading Ubuntu from one major version to another. These packages can cause strange errors like Ubuntu bug #151045. The solution to this problem is a package named deborphan. deborphan removes orphan packages that are left on your Ubuntu installation and you should run this […]

Read More
Scripting

Courier-IMAP to Dovecot Migration Script

I’ve just migrated a couple of servers from Courier-IMAP to Dovecot, and am very happy with the latter so far. I thought I’d share the courier2dovecot shell script I whipped together (based on the instructions I found in the migration how-to), for converting Courier-IMAP maildirs to Dovecot format. While the script is rather simple, it […]

Read More
Scripting

Shell script for removing duplicate files

The following shell script finds duplicate (2 or more identical) files and outputs a new shell script containing commented-out rm statements for deleting them. You then have to edit the file to select which files to keep – the script can’t safely do it automatically! OUTF=rem-duplicates.sh; echo “#! /bin/sh” > $OUTF; find “$@” -type f […]

Read More