Fink

Installation - 4. Clean Upgrade

There are situations, which normally don't come up every day, in which you may find that you need to install Fink over again.

4.1 Situations Calling for a Clean Reinstall

4.2 Backing up to save time

To save time after you have reinstalled Fink, you can get a transcript of your installed packages. The following command in a terminal window will work, even if for some reason the Fink tools aren't functioning:

grep -B1 "install ok installed" /opt/sw/var/lib/dpkg/status \
| grep "^Package:" | cut -d: -f2 | cut -d\  -f2 > finkinst.txt

This will save the list of your packages in the file finkinst.txt in the current working directory.

You may also want to copy or move the sources in /opt/sw/src to another location so that you don't have to spend time downloading them when you begin restoring your Fink distribution.

In addition, if you have made global configuration changes to any of your packages by editing configuration files in /opt/sw/etc, then you may wish to back those up.

4.3 Removing Your Old Fink

Once you've backed everything up, you are ready to remove your Fink distribution. You can remove /opt/sw as well as anything in /Applications/Fink using the Finder or the command line:

sudo rm -rf /opt/sw /Applications/Fink/*

(Replace /opt/sw by your actual Fink tree).

4.4 Installing Fink Again

First, follow the first-time install instructions.

Once you have downloaded package descriptions, you can put the sources that you backed up into /opt/sw/src either using the Finder or the command line:

sudo cp /path/to/backup/* /opt/sw/src

(As usual, replace /opt/sw with your Fink tree). If you prefer, you can use fink configure to specify your backup location:

In what additional directory should Fink look for downloaded tarballs? [] 
(enter your backup directory at the prompt). 

Note: this requires that the entire path to and including your backup directory is world-readable.

You can also restore your global configuration files at this time. Note: we recommend that you not restore /opt/sw/etc/fink.conf from your prior installation of Fink, to avoid incompatibilities. You can open it up in a text editor and enter the correponding values into fink configure.