[fs.op.remove] # 31 Input/output library [[input.output]](./#input.output) ## 31.12 File systems [[filesystems]](filesystems#fs.op.remove) ### 31.12.13 Filesystem operation functions [[fs.op.funcs]](fs.op.funcs#fs.op.remove) #### 31.12.13.31 Remove [fs.op.remove] [🔗](#lib:remove,path) `bool filesystem::remove(const path& p); bool filesystem::remove(const path& p, error_code& ec) noexcept; ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18439) *Effects*: If exists(symlink_status(p, ec)), the file p is removed as if by POSIX remove[.](#1.sentence-1) [*Note [1](#note-1)*: A symbolic link is itself removed, rather than the file it resolves to[.](#1.sentence-2) — *end note*] [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18448) *Postconditions*: exists(symlink_status(p)) is false[.](#2.sentence-1) [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18452) *Returns*: true if a file p has been removed and false otherwise[.](#3.sentence-1) [*Note [2](#note-2)*: Absence of a file p is not an error[.](#3.sentence-2) — *end note*] [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18459) *Throws*: As specified in [[fs.err.report]](fs.err.report "31.12.5 Error reporting")[.](#4.sentence-1)