---
title: removeFile()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nscolorlist/removefile()
---

# removeFile()

Removes the file from which the list was created, if the file is in a standard search path and owned by the user.

## Declaration

```swift
func removeFile()
```

## Discussion

Discussion In addition to removing the file, this method removes the color list from the contents of the availableColorLists property. If there are no outstanding references to the color list, this method might also deallocate the object.

## See Also

### Writing and Removing Color List Files

- [write(to:)](appkit/nscolorlist/write(to:).md)
- [write(toFile:)](appkit/nscolorlist/write(tofile:).md)
