How to erase one partition not all of the disk in a safe way on ubuntuHow can I securely erase a hard drive?Can't add space to my Ubuntu partitionSafest way to format and add unassigned partition to Ubuntu partition in a dual boot system with win 7How can I efficiently format my Ubuntu Live USB to a FAT32 partition?Recover ext4 file system after quick format

Can dual US-Canadian citizens travel to the US with an expired US passport but valid Canadian passport?

In the top five, I'm odd

Submitting list of forbidden words

Is a vector space naturally isomorphic to its dual?

Why don't the crew of Moya know the location of their homeworlds?

Fantasy movie with a deaf man, strong man who hurls cannon balls and a flying ship

Is it usual for a US president to make specific comments about a UK Prime Minister's suitability during a general election?

Can abstractions and good code practice in embedded C++ eliminate the need for the debugger?

Is there a way to download the box art for games?

A concrete example of the deficiency of triangulated categories?

Famous statistical wins and horror stories for teaching purposes

How to build CNOT gate out of universal gates?

How does a variable caster level work for spells?

I have been accused of copying two lab reports from the previous year even though I had done everything by myself

Mechanics to keep mobs and environment alive without using tons of memory?

(Re-)entering UK academic system after a long time abroad

After upgrading to Xcode 11.2 from Xcode 11.1, app crashes due to _UITextLayoutView

Are there any galaxies visible in the night sky around the Orion constellation?

Drawing a Wickselian triangle graph in Latex

Scriptwriting, screenplay writing, playwriting, blogging

Why is the Duration of Time spent in the Dayside greater than that of the Night side of the Moon for Chandrayaan-2 Orbiter?

Cisco ASA 5512X does not allow connections across VLANs to internet

Is there a greedy heuristic approach to the MILP problem?

Languages which changed their writing direction



How to erase one partition not all of the disk in a safe way on ubuntu


How can I securely erase a hard drive?Can't add space to my Ubuntu partitionSafest way to format and add unassigned partition to Ubuntu partition in a dual boot system with win 7How can I efficiently format my Ubuntu Live USB to a FAT32 partition?Recover ext4 file system after quick format






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









1

















Installation type window Ubuntu



I have 2 partitions, my system file, swap.. every thing is on the partition which named now (free space) because I clicked the [-] button.
The second partition is the partition where I usually store some important data in and I don't want to erase it.



What I want to do is to Erase the partition which called (free space) safely, mean if someone installed photoRec for example he will not be able to recover my old files.
I found here on this website many answers, but all of what I found guides the user to erase all of his disk; but I don't want to do that, I just want to erase one partition, because the secret data is stored there (in free space).
I don't know what is the name of this method, maybe it's replacing the free data on the partition with zeros, (I don't know but want the safest).
Another question: the hacker can't recover the files on my partition (free space) after erasing it safely even if the another partition (/dev/sda4 ntfs) is still on my device without erasing, true?










share|improve this question




























  • The free space is not allocated to a partition; I see only a single partition being sda4 (ntfs). Free space is unallocated to any partition; dev sda is the physical disk itself (not a partition). I'm confused by what you see as the 'second' partition as I only see one (sda4)

    – guiverc
    Jul 14 at 4:07











  • Me too, I don't know any thing, the only thing I know that my linux was on that free space before I clicked the [-] button.

    – sam islam
    Jul 14 at 4:11











  • Use the space for something else (ie. make a partition there, and fill it with junk, or write 0101010 etc. on it, then something else or 1010101, then erase the partition so it' free again) - i'm still confused by your question though.

    – guiverc
    Jul 14 at 4:12












  • Maybe the question should be: I want to make safe erase for this (free space) not for the /dev/sda4 ntfs.

    – sam islam
    Jul 14 at 4:13











  • Thank you because you're trying to help me guiverc, okay I made a partition there, but this is a very big space 262GB how I'll fill all of this free space? What is the best way?

    – sam islam
    Jul 14 at 4:19

















1

















Installation type window Ubuntu



I have 2 partitions, my system file, swap.. every thing is on the partition which named now (free space) because I clicked the [-] button.
The second partition is the partition where I usually store some important data in and I don't want to erase it.



What I want to do is to Erase the partition which called (free space) safely, mean if someone installed photoRec for example he will not be able to recover my old files.
I found here on this website many answers, but all of what I found guides the user to erase all of his disk; but I don't want to do that, I just want to erase one partition, because the secret data is stored there (in free space).
I don't know what is the name of this method, maybe it's replacing the free data on the partition with zeros, (I don't know but want the safest).
Another question: the hacker can't recover the files on my partition (free space) after erasing it safely even if the another partition (/dev/sda4 ntfs) is still on my device without erasing, true?










share|improve this question




























  • The free space is not allocated to a partition; I see only a single partition being sda4 (ntfs). Free space is unallocated to any partition; dev sda is the physical disk itself (not a partition). I'm confused by what you see as the 'second' partition as I only see one (sda4)

    – guiverc
    Jul 14 at 4:07











  • Me too, I don't know any thing, the only thing I know that my linux was on that free space before I clicked the [-] button.

    – sam islam
    Jul 14 at 4:11











  • Use the space for something else (ie. make a partition there, and fill it with junk, or write 0101010 etc. on it, then something else or 1010101, then erase the partition so it' free again) - i'm still confused by your question though.

    – guiverc
    Jul 14 at 4:12












  • Maybe the question should be: I want to make safe erase for this (free space) not for the /dev/sda4 ntfs.

    – sam islam
    Jul 14 at 4:13











  • Thank you because you're trying to help me guiverc, okay I made a partition there, but this is a very big space 262GB how I'll fill all of this free space? What is the best way?

    – sam islam
    Jul 14 at 4:19













1












1








1








Installation type window Ubuntu



I have 2 partitions, my system file, swap.. every thing is on the partition which named now (free space) because I clicked the [-] button.
The second partition is the partition where I usually store some important data in and I don't want to erase it.



What I want to do is to Erase the partition which called (free space) safely, mean if someone installed photoRec for example he will not be able to recover my old files.
I found here on this website many answers, but all of what I found guides the user to erase all of his disk; but I don't want to do that, I just want to erase one partition, because the secret data is stored there (in free space).
I don't know what is the name of this method, maybe it's replacing the free data on the partition with zeros, (I don't know but want the safest).
Another question: the hacker can't recover the files on my partition (free space) after erasing it safely even if the another partition (/dev/sda4 ntfs) is still on my device without erasing, true?










share|improve this question

















Installation type window Ubuntu



I have 2 partitions, my system file, swap.. every thing is on the partition which named now (free space) because I clicked the [-] button.
The second partition is the partition where I usually store some important data in and I don't want to erase it.



What I want to do is to Erase the partition which called (free space) safely, mean if someone installed photoRec for example he will not be able to recover my old files.
I found here on this website many answers, but all of what I found guides the user to erase all of his disk; but I don't want to do that, I just want to erase one partition, because the secret data is stored there (in free space).
I don't know what is the name of this method, maybe it's replacing the free data on the partition with zeros, (I don't know but want the safest).
Another question: the hacker can't recover the files on my partition (free space) after erasing it safely even if the another partition (/dev/sda4 ntfs) is still on my device without erasing, true?







disk format safely






share|improve this question
















share|improve this question













share|improve this question




share|improve this question








edited Jul 14 at 5:05









PRATAP

6,7184 gold badges11 silver badges44 bronze badges




6,7184 gold badges11 silver badges44 bronze badges










asked Jul 14 at 3:56









sam islamsam islam

284 bronze badges




284 bronze badges















  • The free space is not allocated to a partition; I see only a single partition being sda4 (ntfs). Free space is unallocated to any partition; dev sda is the physical disk itself (not a partition). I'm confused by what you see as the 'second' partition as I only see one (sda4)

    – guiverc
    Jul 14 at 4:07











  • Me too, I don't know any thing, the only thing I know that my linux was on that free space before I clicked the [-] button.

    – sam islam
    Jul 14 at 4:11











  • Use the space for something else (ie. make a partition there, and fill it with junk, or write 0101010 etc. on it, then something else or 1010101, then erase the partition so it' free again) - i'm still confused by your question though.

    – guiverc
    Jul 14 at 4:12












  • Maybe the question should be: I want to make safe erase for this (free space) not for the /dev/sda4 ntfs.

    – sam islam
    Jul 14 at 4:13











  • Thank you because you're trying to help me guiverc, okay I made a partition there, but this is a very big space 262GB how I'll fill all of this free space? What is the best way?

    – sam islam
    Jul 14 at 4:19

















  • The free space is not allocated to a partition; I see only a single partition being sda4 (ntfs). Free space is unallocated to any partition; dev sda is the physical disk itself (not a partition). I'm confused by what you see as the 'second' partition as I only see one (sda4)

    – guiverc
    Jul 14 at 4:07











  • Me too, I don't know any thing, the only thing I know that my linux was on that free space before I clicked the [-] button.

    – sam islam
    Jul 14 at 4:11











  • Use the space for something else (ie. make a partition there, and fill it with junk, or write 0101010 etc. on it, then something else or 1010101, then erase the partition so it' free again) - i'm still confused by your question though.

    – guiverc
    Jul 14 at 4:12












  • Maybe the question should be: I want to make safe erase for this (free space) not for the /dev/sda4 ntfs.

    – sam islam
    Jul 14 at 4:13











  • Thank you because you're trying to help me guiverc, okay I made a partition there, but this is a very big space 262GB how I'll fill all of this free space? What is the best way?

    – sam islam
    Jul 14 at 4:19
















The free space is not allocated to a partition; I see only a single partition being sda4 (ntfs). Free space is unallocated to any partition; dev sda is the physical disk itself (not a partition). I'm confused by what you see as the 'second' partition as I only see one (sda4)

– guiverc
Jul 14 at 4:07





The free space is not allocated to a partition; I see only a single partition being sda4 (ntfs). Free space is unallocated to any partition; dev sda is the physical disk itself (not a partition). I'm confused by what you see as the 'second' partition as I only see one (sda4)

– guiverc
Jul 14 at 4:07













Me too, I don't know any thing, the only thing I know that my linux was on that free space before I clicked the [-] button.

– sam islam
Jul 14 at 4:11





Me too, I don't know any thing, the only thing I know that my linux was on that free space before I clicked the [-] button.

– sam islam
Jul 14 at 4:11













Use the space for something else (ie. make a partition there, and fill it with junk, or write 0101010 etc. on it, then something else or 1010101, then erase the partition so it' free again) - i'm still confused by your question though.

– guiverc
Jul 14 at 4:12






Use the space for something else (ie. make a partition there, and fill it with junk, or write 0101010 etc. on it, then something else or 1010101, then erase the partition so it' free again) - i'm still confused by your question though.

– guiverc
Jul 14 at 4:12














Maybe the question should be: I want to make safe erase for this (free space) not for the /dev/sda4 ntfs.

– sam islam
Jul 14 at 4:13





Maybe the question should be: I want to make safe erase for this (free space) not for the /dev/sda4 ntfs.

– sam islam
Jul 14 at 4:13













Thank you because you're trying to help me guiverc, okay I made a partition there, but this is a very big space 262GB how I'll fill all of this free space? What is the best way?

– sam islam
Jul 14 at 4:19





Thank you because you're trying to help me guiverc, okay I made a partition there, but this is a very big space 262GB how I'll fill all of this free space? What is the best way?

– sam islam
Jul 14 at 4:19










1 Answer
1






active

oldest

votes


















1


















The free space shown in the picture is an unpartitioned portion of the disk.

To securely erase it:

1 - Create a partition on free space and format it ext4

2 - Write randoms on all space

3 - Delete created partition




Here is more details for step 2 : how to write randoms on all the free space

Let's say that the partition created from free space is /dev/sda1

Option 0 : not randoms but fill with zeros

The Ubuntu gnome-disks manager have an 'Erase' option which fill with zeros

Its quite secure but there is more secure : filling with randoms

Option 1 : Fill with randoms using dd:
sudo dd if=/dev/urandom of=/dev/sda1

Option 2 : Fill with randoms using the secure deletion tool shred

If not present on the system, install it, its part of the package coreutils
sudo apt install coreutils

Usage:
sudo shred -v -n 1 /dev/sda1
option -n 1 is for 1 pass, can be increased for more security and longer process time...






share|improve this answer



























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1158144%2fhow-to-erase-one-partition-not-all-of-the-disk-in-a-safe-way-on-ubuntu%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown


























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1


















    The free space shown in the picture is an unpartitioned portion of the disk.

    To securely erase it:

    1 - Create a partition on free space and format it ext4

    2 - Write randoms on all space

    3 - Delete created partition




    Here is more details for step 2 : how to write randoms on all the free space

    Let's say that the partition created from free space is /dev/sda1

    Option 0 : not randoms but fill with zeros

    The Ubuntu gnome-disks manager have an 'Erase' option which fill with zeros

    Its quite secure but there is more secure : filling with randoms

    Option 1 : Fill with randoms using dd:
    sudo dd if=/dev/urandom of=/dev/sda1

    Option 2 : Fill with randoms using the secure deletion tool shred

    If not present on the system, install it, its part of the package coreutils
    sudo apt install coreutils

    Usage:
    sudo shred -v -n 1 /dev/sda1
    option -n 1 is for 1 pass, can be increased for more security and longer process time...






    share|improve this answer






























      1


















      The free space shown in the picture is an unpartitioned portion of the disk.

      To securely erase it:

      1 - Create a partition on free space and format it ext4

      2 - Write randoms on all space

      3 - Delete created partition




      Here is more details for step 2 : how to write randoms on all the free space

      Let's say that the partition created from free space is /dev/sda1

      Option 0 : not randoms but fill with zeros

      The Ubuntu gnome-disks manager have an 'Erase' option which fill with zeros

      Its quite secure but there is more secure : filling with randoms

      Option 1 : Fill with randoms using dd:
      sudo dd if=/dev/urandom of=/dev/sda1

      Option 2 : Fill with randoms using the secure deletion tool shred

      If not present on the system, install it, its part of the package coreutils
      sudo apt install coreutils

      Usage:
      sudo shred -v -n 1 /dev/sda1
      option -n 1 is for 1 pass, can be increased for more security and longer process time...






      share|improve this answer




























        1














        1










        1









        The free space shown in the picture is an unpartitioned portion of the disk.

        To securely erase it:

        1 - Create a partition on free space and format it ext4

        2 - Write randoms on all space

        3 - Delete created partition




        Here is more details for step 2 : how to write randoms on all the free space

        Let's say that the partition created from free space is /dev/sda1

        Option 0 : not randoms but fill with zeros

        The Ubuntu gnome-disks manager have an 'Erase' option which fill with zeros

        Its quite secure but there is more secure : filling with randoms

        Option 1 : Fill with randoms using dd:
        sudo dd if=/dev/urandom of=/dev/sda1

        Option 2 : Fill with randoms using the secure deletion tool shred

        If not present on the system, install it, its part of the package coreutils
        sudo apt install coreutils

        Usage:
        sudo shred -v -n 1 /dev/sda1
        option -n 1 is for 1 pass, can be increased for more security and longer process time...






        share|improve this answer














        The free space shown in the picture is an unpartitioned portion of the disk.

        To securely erase it:

        1 - Create a partition on free space and format it ext4

        2 - Write randoms on all space

        3 - Delete created partition




        Here is more details for step 2 : how to write randoms on all the free space

        Let's say that the partition created from free space is /dev/sda1

        Option 0 : not randoms but fill with zeros

        The Ubuntu gnome-disks manager have an 'Erase' option which fill with zeros

        Its quite secure but there is more secure : filling with randoms

        Option 1 : Fill with randoms using dd:
        sudo dd if=/dev/urandom of=/dev/sda1

        Option 2 : Fill with randoms using the secure deletion tool shred

        If not present on the system, install it, its part of the package coreutils
        sudo apt install coreutils

        Usage:
        sudo shred -v -n 1 /dev/sda1
        option -n 1 is for 1 pass, can be increased for more security and longer process time...







        share|improve this answer













        share|improve this answer




        share|improve this answer










        answered Jul 14 at 4:50









        cmak.frcmak.fr

        3,7841 gold badge15 silver badges31 bronze badges




        3,7841 gold badge15 silver badges31 bronze badges































            draft saved

            draft discarded















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1158144%2fhow-to-erase-one-partition-not-all-of-the-disk-in-a-safe-way-on-ubuntu%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown









            Popular posts from this blog

            Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

            How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region

            Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü