<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSColorList/removeFile()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSColorList(im)removeFile"
  },
  "title" : "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.

```
func removeFile()
```

## Discussion

In addition to removing the file, this method removes the color list from the contents of the [`availableColorLists`](/documentation/AppKit/NSColorList/availableColorLists) property. If there are no outstanding references to the color list, this method might also deallocate the object.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)