LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-28-2018, 06:10 PM   #1
jettjett
Member
 
Registered: Feb 2018
Posts: 40

Rep: Reputation: Disabled
can't erase / delete files usb


i have ubuntu os on my flash drive and the usb is now "write-protected.

i need to delete all files. can someone tell me how to clear the usb - deleting the os?
 
Old 02-28-2018, 06:32 PM   #2
Mill J
Senior Member
 
Registered: Feb 2017
Location: @127.0.0.1
Distribution: Mint, Void, MX, Haiku, PMOS, Plasma Mobile, and many others
Posts: 1,258
Blog Entries: 2

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Are you booting off of this usb? Or does it mount read only when you insert it?
 
Old 02-28-2018, 06:49 PM   #3
jettjett
Member
 
Registered: Feb 2018
Posts: 40

Original Poster
Rep: Reputation: Disabled
mill, it has an os on it. it had 2 partitions with the os, then i deleted 1 partition.

not trying to boot from it; yes, it mounts read only when i mount it (and try to remove files)
 
Old 02-28-2018, 07:02 PM   #4
Mill J
Senior Member
 
Registered: Feb 2017
Location: @127.0.0.1
Distribution: Mint, Void, MX, Haiku, PMOS, Plasma Mobile, and many others
Posts: 1,258
Blog Entries: 2

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
So can you format the entire partition? my favorite tool is gparted, however Ubuntu ships with a Disks app that can do some simple partition manipulation.
 
Old 02-28-2018, 08:17 PM   #5
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,330

Rep: Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579
unmount the usb partition and then reformatting the partition will remvoe all the files. This can be either done from the command line or use gparted as suggested.
 
Old 02-28-2018, 09:34 PM   #6
jettjett
Member
 
Registered: Feb 2018
Posts: 40

Original Poster
Rep: Reputation: Disabled
yes, correct, both of you. i reformatted using ubuntu "disks" like mill said = deleted the partition all together and erased all files.
thanks!
 
Old 03-01-2018, 01:50 AM   #7
Syndacate
Member
 
Registered: Aug 2008
Location: Santa Clara, CA
Distribution: Ubuntu, mainly. Too much stuff works out of the box O.o
Posts: 71

Rep: Reputation: 52
Quote:
Originally Posted by jettjett View Post
yes, correct, both of you. i reformatted using ubuntu "disks" like mill said = deleted the partition all together and erased all files.
thanks!
For future ref, if this happens again, and formatting is not what you want to do, you can simply force mount as writeable, ie (if it's already mounted):
Code:
mount -o remount,rw /dev/foo /dir
 
2 members found this post helpful.
Old 11-17-2018, 04:31 PM   #8
cesarbergara
Member
 
Registered: Feb 2012
Location: Buenos Aires, Argentina
Distribution: Debian, Suse, Mandrake,
Posts: 92

Rep: Reputation: Disabled
can't erase / delete files usb

Hi. Do you see in the /etc/fstab file? Maybe your system put devices (like pendrive) in the format "ro" . You can change in this file this option to "rw" and solve future and repetitive error. Other options like propietaries,group,chmod,etc can optimize your sistem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I want to delete/erase my entire hard drive. Lola Kews Ubuntu 19 10-14-2012 07:56 PM
An Automatic Delete or Erase Program alrey Linux - Software 2 02-10-2011 06:18 PM
How do I delete/erase/format DVD ISO setup disk? agentchange Linux - Newbie 11 08-19-2006 04:34 AM
How do I delete/erase/format DVD ISO setup disk? agentchange SUSE / openSUSE 8 08-18-2006 11:37 PM
Corrupt J2re: How Do I remove/delete/erase it TSynergy Linux - Newbie 5 11-22-2004 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration