---
title: removingLastComponent()
framework: swift-package-manager
role: symbol
role_heading: Instance Method
path: swift-package-manager/documentation/packageplugin/path/removinglastcomponent()
---

# removingLastComponent()

The path except for the last path component.

## Declaration

```swift
func removingLastComponent() -> Path
```
