It's not possible to delete a line of a file. You need to read the file in, make whatever edits you require, then write the new contents back out again. IO.File.ReadAllLines will create a String array. You can add the contents of the array to a List(Of String). You can then Remove an item from that collection. The ToArray method will convert back to an array, then you can use IO.File.WriteAllLines to write the result to the file again.