Getting rid of a text file depends entirely on whether you want to delete the physical file from your device storage or remove text messaging notifications and content interfaces from your screen. To delete a file with a .txt extension, simply locate it in your file manager or desktop, right-click or long-press on the icon, and select the delete or move-to-trash option. If your goal is to clear text messaging history or notifications on a smartphone, you can open your messaging application, swipe or select the conversation thread, and choose the delete or clear conversation command through the app settings.