Deleting files safely

Note: Follow these instructions to delete files from normal hard drives. Flash memories and SSD drives utilise a different technology and these instructions do not apply to them directly.

Encrypt the drives to keep data protected from unauthorised access.

Get to know the Cryptomator software as well. It allows you to encrypt your data on your own workstation, on movable storage media and on cloud services.

    Deleting a file from the operating system using the Delete command usually does not prevent the restoration of the file at a later time.
    Pay close attention to the deletion of sensitive data.

    Safely deleting all data of a device

    If you need to safely delete all the data of a device (such as computer, usb hard drive), contact Helpdesk and tell them where and when they can collect the device for wiping.

    Deleting individual files or directories

    NOTE! Deleting a file by overwriting it does not necessarily destroy it permanently in the case of an SSD hard drive. To be sure, order the wiping of the entire drive from Helpdesk. See below for instructions on how to determine the hard drive type of your device.


    Delete a file using the operating system’s Delete command. Then right-click the Windows button and choose Windows Powershell in the menu which opens to start the PowerShell. To permanently delete a file or folder, use the command cipher /W:[directory], for example cipher /W:Z:\file to delete.


    Start the Terminal command line application. Command rm –P [file location] removes and overwrites the file. Use –pr SHRED? to remove a folder.


    The command line commend shred (instructions: shred --help) removes and overwrites the file three times by default.

    What type of drive do I have?

    If you don’t know the drive type of your computer, you can determine it as follows:

    Windows 10

    • Click Start > Windows PowerShell > Windows PowerShell.
    • At the prompt, enter Get-PhysicalDisk (Item 1 in the figure).
    • Column MediaType (2) shows the information of your computer’s hard drives. In this example, the computer has two drives, one normal HDD drive and one SSD drive.



    • Open Apple Menu > About This Mac > System Report.
    • In the Overview tab, open System Report.
    • Open Hardware > Storage. The types of the computer’s hard drives are shown in the right under Medium Type.



    • At the prompt, enter lsblk -d -o name,rota ((1), rota comes from the words rotational device. For SSD drives, its value is = 0)).
    • Column (2) shows the information of your computer’s hard drives. In this example, drive sda is an SSD drive and sdb is an HDD drive.

    Give feedback

    The instructions site of the University of Helsinki's IT Helpdesk helps you with IT-related issues related to your work. Let us know how we can improve our instructions. We greatly appreciate your feedback!

    How would you improve these instructions?
    Back to top