To remove a file, we need to import the os package. It contains the Remove() and RemoveAll() functions.
os.Remove("file.txt")