[How To] Install, uninstall and manage programs in FreeBSD

There are three ways to install 3rd party applications and programs in FreeBSD.

  • Ports collection – Packages from source code.
  • Binary packages – Pre-built binary packages.
  • Compiling an application from source code.

How to find applications and programs programs in FreeBSD?

1. Find installed applications (using package system)


Output will be similar to:

gettext-0.16.1_3    GNU gettext package
libiconv-1.11_1     A character set conversion library
mysql-client-5.1.22 Multithreaded SQL database (client)
nagios-statd-3.12   Daemon/client to check remote host information for Nagios
net-snmp-5.3.1_7    An extendable SNMP implementation
perl-5.8.8_1        Practical Extraction and Report Language
pkg_info | less
pkg_info | grep mysql

Output will be similar to

mysql-client-5.1.22 Multithreaded SQL database (client)

2. Find applications to install (using ports)

whereis app_name
app_name: /usr/ports/sysutils/app_name


echo /usr/ports/*/*app_name*


cd /usr/ports
make search name=app_name
Port:   app_name-3.64.5
Path:   /usr/ports/sysutils/app_name
Info:   Lists information about open files (similar to fstat(1))
Maint:  [email protected]
Index:  sysutils

For detailed package information type following command:

pkg_info app_name

How to install applications and programs in FreeBSD

1. Installing with pkg_add command (binary method)

For installing package named app_name-3.64.5.tgz use:

pkg_add app_name-3.64.5.tgz

For installing package using internet i.e. use the remote fetching feature add -r, and -v for verbose mode.

pkg_add -r -v app_name

2. Installing by ports(source method)

First upgrade all ports installed under /usr/ports

If you do this first time, use:

portsnap fetch 
portsnap extract


portsnap update

Find port wich you want to install(see upper)

whereis app_name
app_name: /usr/ports/sysutils/app_name


Change to application directory

cd /usr/ports/sysutils/app_name

Make application


Install application

make install

Clean application

make clean

Or you can use all in one

make install clean

How to uninstall applications and programs programs in FreeBSD

Uninstalling with pkg_delete command

For uninstalling package app_name type:

pkg_delete app_name

Uninstalling installed ports

Change to port directory

cd /usr/ports/sysutils/app_name
make deinstall



  1. LQman Hkeem January 24, 2012 Reply
  2. admin January 24, 2012 Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: