---
name: "dpns-rm"
section: "1"
platform: "linux"
package: "dpm"
version: "1.10.0-2+b3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/dpns-rm"
---

# dpns-rm(1)

remove DPNS files or directories in the name server

## NAME

dpns-rm - remove DPNS files or directories in the name server

## SYNOPSIS

**dpns-rm** \[**-a**\] \[**-f**\] \[**-i**\] *filename*...

**dpns-rm** \[**-f**\] \[**-i**\] **-r** *dirname*...

## DESCRIPTION

**dpns-rm** removes DPNS files or directories in the name server. For directories either **-r** or **-R** must be present. For regular files, it calls **dpns\_unlink** while for directories, it calls **dpns\_rmdir**.

This requires write permission in the parent directory and the file itself. If write permission on an entry is denied, the standard input is a terminal and the **-f** option is not given, the prompt "override write protection" appears and if the response is not **y**, the entry is not deleted. Entries directly under a protected directory are never deleted.

- *path*

  specifies the DPNS pathname. If *path* does not start with **/**, it is prefixed by the content of the **DPNS\_HOME** environment variable.

## OPTIONS

The following options are supported:

- **-a**

  Remove the **metadata** information about a file **and** the **metadata** information about the replicas that it may have. **Remember** that this is a metadata-only operation, it does not remove the replicas physically from the disk. Removing metadata entries about replicas without removing the replicas from the disks leads to non-reachable files on disk. Applies only to files, not directories.

- **-f**

  Do not give an error message if the file/directory does not exist.

- **-i**

  Request acknowledge before removing each individual entry.

- **-R**

  Recursive mode (equivalent to **-r**).

- **-r**

  Recursive mode.

## EXIT STATUS

This program returns 0 if the operation was successful or \>0 if the operation failed.

## SEE ALSO

**[Castor\_limits(4)](/Castor_limits/4.md)**, **[dpns\_rmdir(3)](/dpns_rmdir/3.md)**, **[dpns\_unlink(3)](/dpns_unlink/3.md)**

## AUTHOR

**LCG Grid Deployment** Team
