Packages and configuration files

Some packages have configuration files that can be edited by users. Usually these configuration files are located under /sw/etc; some common file extensions are .cfg, .conf., and .ini.

Fink has two different behaviours when removing a package that has installed configuration files. If the user runs

fink remove package

then Fink (internally, its dpkg implementation for .deb management) doesn’t remove any configuration files installed by the package. This is handy because subsequent installs/updates of that package will keep previous configuration. On the other hand, it is possible that newer versions of the package have different entries in the configuration files. In general, it is up to the application to manage these differences.

What if a user wants to remove a package and its configuration files? The command

fink purge package

will do that.

In order to check if a given package has configuration files that are preserved when the package is removed, run the following command:

fink dumpinfo package | grep -i conffiles

If you want to check which package has installed a configuration file (e.g. /sw/etc/package.conf), run the following command:

dpkg -S /sw/etc/package.conf

If you are a packager, specify the configuration files in the field ConfFiles in your package description.


2 responses to “Packages and configuration files

  1. Pingback: Cleaning Fink up: packages « Finkers

  2. Pingback: Starting anew « Finkers: a blog about Fink

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s