How to delete a post the correct way?

I am still a newbie in hugo obviously. I learned that hugo new posts/ creates a new post, but I can’t find anywhere how I can delete a post through the hugo binary?? Or should I just go to ~content/posts/ and delete it?

Help much appreaciated.


Hey, @tobleron - Yeah, you just delete it.

1 Like

If your website doesn’t make heavy use of cross references (linking other content) it should be fine to just delete the content file.

Thank you all for your support.

digitalcraftsman Do you mean there is a way to delete the posts through the hugo binary? If anyone knows please… be my guest :slight_smile:

The Hugo binary doesn’t provide a command to do that. As Bud already said just delete the file.

With the cross references I was referring to the relref, ref shortcode that allows you to link (headlines in) other content files. But Hugo would warn you anyway if the link is broken due to the absence of the given content file.

Each operating system has its own commands to delete files, these commands work well, and it makes no sense to duplicate them in Hugo.


This explains why there is no delete functions.