{"id":4280,"date":"2011-10-16T16:52:31","date_gmt":"2011-10-16T20:52:31","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/?p=4280"},"modified":"2011-10-16T16:52:31","modified_gmt":"2011-10-16T20:52:31","slug":"secure-delete","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/secure-delete\/","title":{"rendered":"Secure-Delete"},"content":{"rendered":"<p>From <a href=http:\/\/www.ubuntugeek.com\/tools-to-delete-files-securely-in-ubuntu-linux.html target=\"_blank\" rel=\"noopener noreferrer\">ubuntugeek.com<\/a><\/p>\n<p>The Secure-Delete tools are a particularly useful set of programs that use advanced techniques to permanently delete files. To install the Secure-Delete tools in Ubuntu, run the following command<\/p>\n<p>  <code>sudo aptitude install secure-delete<\/code><\/p>\n<p>The Secure-Delete package comes with the following commands<\/p>\n<p> srm(Secure remove) &#8211; used for deleting files or directories currently on your hard disk.<br \/>\n smem(Secure memory wiper) &#8211; used to wipe traces of data from your computer\u2019s memory (RAM).<br \/>\n sfill(Secure free space wiper) &#8211; used to wipe all traces of data from the free space on your disk.<br \/>\n sswap(Secure swap wiper) &#8211; used to wipe all traces of data from your swap partition.<br \/>\n srm &#8211; Secure remove<\/p>\n<p>srm removes each specified file by overwriting, renaming, and truncat-ing it before unlinking. This prevents other people from undeleting  or recovering any information about the file from the command line.<\/p>\n<p>srm,  like  every  program  that  uses the getopt function to parse its arguments, lets you use the &#8212; option to indicate  that  all  arguments are non-options.  To remove a file called \u2018-f\u2019 in the current directory, you could type either \u201csrm &#8212; -f\u201d or \u201csrm .\/-f\u201d.<\/p>\n<p><strong>srm Syntax<\/strong><\/p>\n<p>srm [OPTION]\u2026 FILE\u2026<\/p>\n<p>Available Options<\/p>\n<p>-d, &#8211;directory &#8211; ignored (for compatibility with rm)<br \/>\n-f, &#8211;force &#8211; ignore nonexistent files, never prompt<br \/>\n-i, &#8211;interactive &#8211; prompt before any removal<br \/>\n-r, -R, &#8211;recursive &#8211; remove the contents of directories recursively<br \/>\n-s, &#8211;simple &#8211; only overwrite with a single pass of random data<br \/>\n-m, &#8211;medium &#8211; overwrite the file with 7 US DoD compliant passes  (0xF6,0\u00d700,0xFF,random,0\u00d700,0xFF,random)<br \/>\n-z, &#8211;zero &#8211; after overwriting, zero blocks used by file<br \/>\n-n, &#8211;nounlink &#8211; overwrite file, but do not rename or unlink it<br \/>\n-v, &#8211;verbose &#8211; explain what is being done<br \/>\n&#8211;help display this help and exit<br \/>\n&#8211;version &#8211; output version information and exit<\/p>\n<p><strong>srm Examples<\/strong><\/p>\n<p>Delete a file using srm<\/p>\n<p>  <code>srm myfile.txt<\/code><\/p>\n<p>Delete a directory using srm<\/p>\n<p>  <code>srm -r myfiles<\/code><\/p>\n<p><strong>smem &#8211; Secure memory wiper<\/strong><\/p>\n<p>smem is designed to delete data which may lie still in your memory (RAM) in a secure manner which can not be recovered by thiefs, law enforcement or other threats. Note that with the new SDRAMs, data will not wither away but will be kept static &#8211; it is easy to extract the necessary information! The wipe algorythm is based on the paper \u201cSecure Deletion of Data from Magnetic and Solid-State Memory\u201d presented at the 6th Usenix Security Symposium by Peter Gutmann, one of the leading civilian cryptographers.<\/p>\n<p>smem Syntax<\/p>\n<p>smem [-f] [-l] [-l] [-v]<\/p>\n<p>Available Options<\/p>\n<p>-f &#8211; fast (and insecure mode): no \/dev\/urandom.<br \/>\n-l &#8211; lessens the security. Only two passes are written: the first with 0\u00d700 and a final random one.<br \/>\n-l -l for a second time lessons the security even more: only one pass with 0\u00d700 is written.<br \/>\n-v &#8211; verbose mode<\/p>\n<p><strong>sfill &#8211; secure free space wipe<\/strong><\/p>\n<p>sfill is designed to delete data which lies on available diskspace on mediums in a secure manner which can not be recovered by thiefs, law enforcement or other threats. The wipe algorythm is based on the paper \u201cSecure Deletion of Data from Magnetic and Solid-State Memory\u201d presented at the 6th Usenix Security Symposium by Peter Gutmann, one of the leading civilian cryptographers.<\/p>\n<p>sfill Syntax<\/p>\n<p>sfill [-f] [-i] [-I] [-l] [-l] [-v] [-z] directory\/mountpoint<\/p>\n<p>Available Option<\/p>\n<p>-f &#8211; fast (and insecure mode): no \/dev\/urandom, no synchronize mode.<br \/>\n-i &#8211; wipe only free inode space, not free disk space<br \/>\n-I -wipe only free disk space, not free inode space<br \/>\n-l -lessens the security. Only two passes are written: one mode with 0xff and a final mode with random values.<br \/>\n-l -l for a second time lessons the security even more: only one random pass is written.<br \/>\n-v &#8211; verbose mode<br \/>\n-z &#8211; wipes the last write with zeros instead of random data<\/p>\n<p>directory\/mountpoint this is the location of the file created in your filesystem. It should lie on the partition you want to write.<\/p>\n<p><strong>sswap &#8211; Secure swap wiper<\/strong><\/p>\n<p>sswap is designed to delete data which may lie still on your swapspace in a secure manner which can not be recovered by thiefs,  law  enforce?ment  or  other  threats.The  wipe  algorythm  is based on the paper \u201cSecure Deletion of Data from Magnetic  and  Solid-State  Memory\u201d  pre?sented  at  the  6th Usenix Security Symposium by Peter Gutmann, one of the leading civilian cryptographers.<\/p>\n<p>sswap Syntax<\/p>\n<p>sswap [-f] [-l] [-l] [-v] [-z] swapdevice<\/p>\n<p>Available Option<\/p>\n<p>-f &#8211; fast (and insecure mode): no \/dev\/urandom, no synchronize  mode.<br \/>\n-l &#8211; lessens the security. Only two passes are written: one mode with 0xff and a final mode with random values.<br \/>\n-l  -l for a second time lessons the security even  more:  only  one pass with random values is written.<br \/>\n-v &#8211; verbose mode<br \/>\n-z &#8211; wipes the last write with zeros instead of random data<\/p>\n<p>sswap Examples<\/p>\n<p>Before you start using sswap you must disable your swap partition.You can determine your mounted swap devices using the following command<\/p>\n<p> <code>cat \/proc\/swaps <\/code><\/p>\n<p>Disable swap using the following command<\/p>\n<p> <code>sudo swapoff \/dev\/sda3<\/code><\/p>\n<p>\/dev\/sda3 &#8211; This is my swap device<\/p>\n<p>Once your swap device is disabled, you can wipe it with sswipe using the following command<\/p>\n<p> <code>sudo sswap \/dev\/sda3<\/code><\/p>\n<p>After completing the above command you need to re-enable swap using the following command<\/p>\n<p> <code>sudo swapon \/dev\/sda3<\/code><\/p>\n<p>From <a href=http:\/\/www.ubuntugeek.com\/tools-to-delete-files-securely-in-ubuntu-linux.html target=\"_blank\" rel=\"noopener noreferrer\">ubuntugeek.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>From ubuntugeek.com The Secure-Delete tools are a particularly useful set of programs that use advanced techniques to permanently delete files. To install the Secure-Delete tools in Ubuntu, run the following command sudo aptitude install secure-delete The Secure-Delete package comes with the following commands srm(Secure remove) &#8211; used for deleting files or directories currently on your&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/secure-delete\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,16],"tags":[],"class_list":["post-4280","post","type-post","status-publish","format-standard","hentry","category-linux-apps","category-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Secure-Delete - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/secure-delete\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Secure-Delete - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"From ubuntugeek.com The Secure-Delete tools are a particularly useful set of programs that use advanced techniques to permanently delete files. To install the Secure-Delete tools in Ubuntu, run the following command sudo aptitude install secure-delete The Secure-Delete package comes with the following commands srm(Secure remove) &#8211; used for deleting files or directories currently on your... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/secure-delete\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2011-10-16T20:52:31+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/secure-delete\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/secure-delete\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Secure-Delete\",\"datePublished\":\"2011-10-16T20:52:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/secure-delete\\\/\"},\"wordCount\":872,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"Apps\",\"Ubuntu\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/secure-delete\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/secure-delete\\\/\",\"name\":\"Secure-Delete - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2011-10-16T20:52:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/secure-delete\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/secure-delete\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/secure-delete\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Secure-Delete\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Secure-Delete - Linux Shtuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/g33kinfo.com\/info\/secure-delete\/","og_locale":"en_US","og_type":"article","og_title":"Secure-Delete - Linux Shtuff","og_description":"From ubuntugeek.com The Secure-Delete tools are a particularly useful set of programs that use advanced techniques to permanently delete files. To install the Secure-Delete tools in Ubuntu, run the following command sudo aptitude install secure-delete The Secure-Delete package comes with the following commands srm(Secure remove) &#8211; used for deleting files or directories currently on your... Read More","og_url":"https:\/\/g33kinfo.com\/info\/secure-delete\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2011-10-16T20:52:31+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/secure-delete\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/secure-delete\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Secure-Delete","datePublished":"2011-10-16T20:52:31+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/secure-delete\/"},"wordCount":872,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["Apps","Ubuntu"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/secure-delete\/","url":"https:\/\/g33kinfo.com\/info\/secure-delete\/","name":"Secure-Delete - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2011-10-16T20:52:31+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/secure-delete\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/secure-delete\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/secure-delete\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Secure-Delete"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/4280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=4280"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/4280\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=4280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=4280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=4280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}