FreeBSD Update All Installed Ports / Applications

To update all installed ports/applications on FreeBSD, you can use the portsnap and portmaster utilities. Follow these steps:

  1. Update your ports tree by running the following command as the superuser:
    # portsnap fetch update

    This command downloads the latest version of the ports tree to your system.

  2. Install portmaster if it is not already installed:
    # pkg install portmaster
  3. Run the following command to update all installed ports:
    # portmaster -a

    This command updates all installed ports to their latest available versions, including any dependencies.

    If you want to be prompted for confirmation before each port update, use the -i option:

    # portmaster -ai

    If you want to rebuild and reinstall all ports, use the -R option:

    # portmaster -aR

    This command will rebuild and reinstall all installed ports, including any dependencies.

  4. After the upgrade process is completed, it is a good practice to rebuild all the installed packages with the new libraries:
    # portmaster -af

    This command will rebuild all the installed packages with the new libraries and ensure that they are using the latest available version of the dependencies.

That’s it! Your ports and applications should now be up to date.

Leave a Comment