---
title: Removing a Unix sym link
description: Learn how to delete a Unix/Linux symbolic link correctly
---

[Blog ](https://www.metaltoad.com/blog)

# [Removing a Unix sym link](https://www.metaltoad.com/blog/removing-unix-sym-link)

 Written by [Metal Toad Staff](https://www.metaltoad.com/blog/author/metal-toad-staff) | Sep 30, 2008 12:00:00 AM

If you try deleting a symbolic link like this:

`rm -f test/`

You get this:

`rm: cannot remove `test/': Not a directory`

Same deal if you try to use 'rmdir' to delete it.

Here's what works:  
Remove the trailing slash from 'test/' and you're all gravy.

Though the sym link looks kind of like a directory, it is just a pointer to the linked file. So just delete it as you would any ol' file.

`rm -f test`

[View full post](https://www.metaltoad.com/blog/removing-unix-sym-link)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Metal Toad Staff"
  },
  "dateModified" : "2025-04-29T22:19:18.754Z",
  "datePublished" : "2008-09-30T00:00:00Z",
  "headline" : "Removing a Unix sym link",
  "image" : {
    "@type" : "ImageObject",
    "height" : 500,
    "url" : "https://6104926.fs1.hubspotusercontent-na1.net/hubfs/6104926/Imported_Blog_Media/Metal_Toad_blog_generic-Aug-11-2023-10-02-31-1838-PM.jpg",
    "width" : 870
  },
  "mainEntityOfPage" : "https://www.metaltoad.com/blog/removing-unix-sym-link",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60.0,
      "url" : "https://6104926.fs1.hubspotusercontent-na1.net/hubfs/6104926/social-suggested-images/6104926.fs1.hubspotusercontent-na1.nethub6104926hubfsMetal_Toad_Logo_orange_horizontal-50-1.jpg",
      "width" : 240.00002
    },
    "name" : "Blog"
  }
}
```