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

I am maintaining a code base that depends on Postgis 1.5. My local dev VM is running FreeBSD 9.2. I have recently been tinkering with packages and inadvertently deleted postgis, so I attempted to reinstall, only to find that 1.5 postgis port has been removed from the port tree. How can I get that port back? I know I can just install from source, but I would rather have it pkg controlled.

share|improve this question
up vote 1 down vote accepted

TLDR: svn co svn:// /usr/ports

I'm guessing you just deleted the actual port tree directory. In that case, you'll need to use svn to retrieve the relevant section of the ports tree from the central FreeBSD repository. This primer will help you achieve that, most relevant to you is probably the "Partial Checkout" sections. If that's too time consuming, just check out the entire ports tree and grab what you need, and make sure you have enough disk space to hold it.

share|improve this answer
I didn't delete the port by accident, the port has been deleted from the tree back in January. But thanks, looks like partial checkout from SVN is exactly what I need. Just need to find the revision where the port was deleted. – Mad Wombat May 31 '14 at 2:03

Important Life lessons:

  1. Don't "tinker" with systems that matter.
  2. If you're going to ignore (1) and "tinker" with a VM then for the love of kittens make a snapshot!

As you've discovered Postgis 1.x no longer appears in the ports tree, and I don't see any packages for it either (It's from 2012 so you shouldn't be surprised by this! It predates the operating system you're running...).

If you want to build this port yourself you will need to retrieve the ports tree from SVN and check out a revision that still contains the postgis 1.5 port. Instructions on doing so can be found in the FreeBSD handbook and the svn documentation (RELEASE_8_4_0 appears to contain postgis 1.5.3).

share|improve this answer
1. Don't be an ass 2. Don't assume things about people 3. Thanks for the link to the handbook, I couldn't possibly found it myself. It doesn't contain any information on actually finding the most recent version of the port I need. So no thanks. – Mad Wombat May 31 '14 at 1:58
@MadWombat I told you how to get a revision of the port (by checking out an appropriate revision of the ports tree using SVN, the basic instructions for which are in the handbook). I even gave you a revision tag that has a recent version of the port. I'm sorry if you don't appreciate my commentary on your situation, but frankly I don't care because it's not for you - it's for the next poor soul that winds up in this situation and needs a not-so-subtle reminder to always mount a scratch monkey. – voretaq7 May 31 '14 at 3:30

If a port has been deleted, then you can pull it out of the rubbish bin via SVN, but it isn't guaranteed to keep working. Most ports in FreeBSD are now 'staged', an infrastructure change to improve package building.

Anyway, you can see the history of the port here:

You can see it was deleted in revision 340004, so check out the last revision before that

svn co -r 340003 svn:// /usr/ports/databases/

And compile as normal. It might break, especially since it might depend on older versions of things like perl and postgres

You might be better off checking out an entire ports tree from back then and using it, but then you lack all of the security updates.

share|improve this answer

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.