# Removing and symlinking /usr/ports



## jb_fvwm2 (Jun 8, 2012)

I needed a /usr with more space, and had unused space on a gjournal place on the same disk.
(Assumes the gjournal disk is mounted: /mnt)

```
mkdir -p /mnt/ports
cd /usr/ports
pax -rw . /mnt/ports
# check the copy is all there... in /mnt/ports
/bin/rm -rf /usr/ports
ln -s /mnt/ports /usr/ports
# working with portmaster, etc etc.  The only glitch appears to be [FILE]/mnt/ports[/FILE]
showing in the prompt...
```
I of course tested the setup with a subdirectory under /usr/ports/distfiles first.
No idea if it works with portsnap
...
Excuse any typos of inaccuracies in the above.:\  (I may not have written the steps down
entirely accurately, but probably so.
...
BTW I hope noone does this with a Usb (drive/thumbdrive) ...


----------



## UNIXgod (Jun 8, 2012)

jb_fvwm2 said:
			
		

> No idea if it works with portsnap



portsnap.conf(5) will allow PORTSDIR environment variable to be overridden.


----------

