For example, say that you already have the package sed-2.0 installed, but you want to upgrade to sed-3.02. After you extract the sed-3.02 files into /usr/local/encap, you should have these files:
/usr/local/encap/sed-2.0/bin/sed /usr/local/encap/sed-2.0/man/man1/sed.1 /usr/local/encap/sed-3.02/bin/sed /usr/local/encap/sed-3.02/man/man1/sed.1 /usr/local/bin/sed -> ../encap/sed-2.0/bin/sed /usr/local/man/man1/sed.1 -> ../encap/sed-2.0/man/man1/sed.1With epkg's versioning capability, you can simply say epkg sed. That will cause epkg to scan the Source Directory, find both versions of sed, and determine which one is the newest. Then it will remove the symbolic links for all of the old versions and install the symbolic links for the newest version automaticly.
Note: Because there's no standard way to do version numbering, epkg uses fuzzy logic to determine which version is newer. It almost always guesses right, but when it doesn't you can use the -S flag to tell it to operate only on a specific package. In the example above, this would be epkg -Sr sed-2.0; epkg -S sed-3.02.