---
name: "portimport"
section: "1"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["openbsd"]
url: "https://new.carta.tech/portimport"
---

# portimport(1)

import a new port to the ports cvs repository

## NAME

**portimport** – import a new port to the ports cvs repository

## SYNOPSIS

**portimport** \[**-p** *portsdir*\] \[**-u** *username*\]

## DESCRIPTION

**portimport** is used to import the directories and files of a new port to the OpenBSD ports [cvs(1)](/cvs/1.md) repository, avoiding common mistakes. It has to be executed from within the new port's directory.

**portimport** calls the [portcheck(1)](/portcheck/1.md) internally to verify that directory and file structure for a port is in place and that no bogus files exist, and also to detect the PKGPATH for a port.

The import is done in two steps. In the first step, the **-n** option of the cvs command is used to only check for possible problems without changing anything and shows the cvs path where the new port will be imported. In the second step, the current ports directory is imported to the OpenBSD ports cvs repository. After the import, the new port is checked out in the respective directory of the local ports tree.

The following options are available:

- **-p** *portsdir*

  Forces the given directory to be treated as ports root directory. Passed through to [portcheck(1)](/portcheck/1.md).

- **-u** *username*

  Set the username used for [ssh(1)](/ssh/1.md), and to compose vendor and release tags. Defaults to the local username.

## SEE ALSO

[cvs(1)](/cvs/1.md), [portcheck(1)](/portcheck/1.md)

## HISTORY

This command is based on the portimport script of Marc Espie, lightly modified by Stuart Henderson and rewritten by Robert Peichaer. Later, actual checks were moved to a separate utility, [portcheck(1)](/portcheck/1.md).

## CAVEATS

The CVSROOT environment variable is not used.
