Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I download a single port from freebsd site instead of downloading the whole port collection?

share|improve this question
What are you trying to accomplish, exactly? Assuming you're talking about portsnap/cvsup, downloading the whole ports collection means downloading all of the metadata files (Makefiles, dependency lists, etc.) for everything in ports, not downloading all of the sources themselves. It will only save you a few megabytes of space -- consider it equivalent to doing an apt-get update in Ubuntu. – jgoldschrafe Feb 22 '11 at 3:38
@jgoldschrafe +1 for detail for cvsup! – Eonil Feb 22 '11 at 4:44

You can install an individual package using the pkg_add command, like this:

pkg_add -r <package>

The -r option asks pkg_add to fetch the package over the network. For example, to install bash:

pkg_add -r bash

As with many things FreeBSD, this is documented in the FreeBSD handbook, specifically in the section titled Using the Packages System. This is worth a read, especially if you're running a -release version of FreeBSD.

share|improve this answer
Thanks but I want a port installing. Sorry :) – Eonil Feb 22 '11 at 4:45

Use SVN to checkout only the directory you need. Say, you need to fetch ONLY multimedia/vlc -- then you use this command:

svn co /usr/ports/multimedia/vlc

Sure, the destination may be whatever you want, like /home/user/vlc etc.

share|improve this answer
This command may be useful in case you have somehow corrupted some of the files in your given port. Like if you edited you port's Makefile and deleted it by accident... That is, contrary to what all clever people do all the time, you DIDN'T save a copy before editing it... I've done this a couple of times ;)) – Kostya Berger Jul 1 '15 at 13:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.