# pkgng alternative to pkg_create



## kpedersen (Aug 19, 2013)

Hi all,

To create packages for all currently installed ports, I use the following command:

`pkg_create -n -b '*'`

*-n* for no clobber
*-b* for backing up the installed port to a package
*'*'* for wildcard meaning all installed ports

Is there an alternative using `pkg create`? It doesn't seem to accept wild cards and the manpage says nothing about no-clobber mode.

Cheers,


----------



## pkubaj (Aug 20, 2013)

Of course there is. Just run `pkg create -a -n`. From pkg-create(8)():

```
-a              Create package tarballs from all packages installed on
                your system.  This option is incompatible with the -g,
                -x, -X or -m manifestdir options.

-n              Do not overwrite already existing packages
```


----------



## kpedersen (Aug 20, 2013)

Awesome! Thanks for that, it is exactly what I need.

Can I check where you found the -a flag? I can't seem to find it in either the pkgng manpages or the pkg_* ones. I knew it stood for "all" in `pkg_info`.


----------



## pkubaj (Aug 20, 2013)

It IS in the PKGNG manpage. In pkg-create(8)(), to be precise.


----------



## kpedersen (Aug 20, 2013)

pkubaj said:
			
		

> It IS in pkgng manpage. In pkg-create(8)(), to be precise.



Ah apologies, I didn't realize pkg-create(8)() and pkg_create(1)() were different :r. I do now!

Thanks again for your help.


----------

