On Thu, Mar 05, 2009 at 12:21:15PM +0100, Paul wrote:

> I had installed postfix from the tarball, but made some mistakes. So to be
> sure everything is correct I want to reinstall Postfix (probably from a
> package), so I first need to uninstall it. But there is no make
> uninstall/remove or some removal program, is there any way to uninstall it
> properly?

The "postfix-files" file found in $config_directory, or in the most
recent versions of Postfix in $daemon_directory, contains a list of all
the files that are installed when Postfix is instaled from source.

"cd" to the directory that contains the "postfix-files" file and in
a POSIX shell (ksh, bash, or "sh" on most systems) run:

    eval "$(postconf command_directory daemon_directory html_directory \
            mailq_path manpage_directory newaliases_path readme_directory \
            sendmail_path | sed -e 's/ = /=/; s,^,export ,')"
    perl -F: -lane '
        next if ($F[1] eq "d" || $F[5] =~ /o/); # directory or obsolete
        next unless $F[0] =~ m{^\$(\w+)};       # comment
        next unless defined($path = $ENV{$1});  # keep
        $F[0] =~ s/\$(\w+)/$path/;              # expand;
        next unless (-l $F[0] || -f _);         # link or file
        printf "%s\n", $F[0];
    ' postfix-files

this will output the list of files to remove.

-- 
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majord...@postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

Reply via email to