Use this tag if you are trying to delete files or folders. It is usually helpful to have an operating system tag alongside.

learn more… | top users | synonyms (2)

171
votes
8answers
8k views

How far will you get with an 'rm -rf /' command?

I've often wondered how far the system will actually get if you run rm -rf /. I doubt the OS would be able to erase itself (?) Bonus Question: After the command has been executed, will rm have ...
62
votes
12answers
5k views

What command do I need to use to remove a file called `-rf`?

I did something crazy at some point that created a file called -rf on my filesystem. Now I can't figure out how to delete it... I've tried: rm "-rf" rm \-rf These just exit immediately, arrgh! ...
60
votes
8answers
106k views

Can I delete the folder “C:\WINDOWS\Installer\$PatchCache$”?

This folder is taking up nearly a GB of my C partition. Is it possible to just delete it?
37
votes
5answers
144k views

How do I get permissions to delete files on Windows 7?

I updated my laptop's OS from Windows XP to Windows 7. There are some leftover files from Windows XP on the computer now. If I try deleting them I get the following error: You need permission to ...
33
votes
8answers
31k views

Tool for deleting directories with path/names too long for normal delete

Windows seems to have a length limit on file names when trying to delete, though it won't prevent those files from being created. Our build process creates a number of temporary files (many build off ...
29
votes
14answers
17k views

Permanently delete files from a flash drive

I heard some people mention that files are deleted from flash drive for good, there is no tracing back. Is that really true? If not, how do I permanently delete files from it? I have a sensitive ...
29
votes
6answers
50k views

Recursively delete empty directories in Windows

I have a directory on my Windows 7 machine that has hundreds if not thousands of sub-directories. Some of them have files, some do not. I want to delete all the empty directories. Looking at the ...
27
votes
6answers
12k views

How to quickly empty a very full recycle bin?

I have deleted about half a million files from a folder, and didn't think to press Shift in order to delete them completely straight away. Now they're clogging my recycle bin, and Windows claims it ...
24
votes
4answers
6k views

How to lock a file against deletion but still make it writeable?

I want to make a file locked against deletion but still be writeable. How do I do this? The file in question is a Truecrypt volume as a file on a NAS SMB Network share, so I don't want to ...
21
votes
2answers
555 views

DEL *1.* deletes all files in folder

I'm trying to delete all files that end with the number one, but for some reason it is deleting all of the files in the folder. The command I'm using is DEL *1.* It works when I use a letter like ...
20
votes
13answers
33k views

How do I delete a folder which is nested quite deep and avoid “File name too long”?

Eclipse created a temp folder in one of the directories which is nested quite deep, e.g. dir1\dir1\dir1\dir1\... I am unable to delete this folder in Windows via Explorer, the del or rmdir ...
19
votes
1answer
20k views

How to use Terminal to delete all .svn folders recursively?

what command can I type into Terminal so that I can: delete all .svn folders within a folder (and from all subdirectories) but not delete anything else ?
19
votes
11answers
102k views

How to delete files and folders that cannot be deleted?

I have a backup copy of a previous Windows' Documents and Settings folder which only contains my original user and within 2 more directories: Favorites and Local Settings. When I try to delete Local ...
19
votes
5answers
46k views

Can't delete folder, need permission from adminstrator? [duplicate]

There's a folder on my desktop called like 'example' and when I try to delete it it says "You require permission from the computer's admistrator to make changes to this folder" when checking the ...
14
votes
7answers
9k views

Put files deleted over the network into a Windows trash can?

From a Windows workstation when I delete files over the network (e.g. a file share, server disk, etc) those files are never put into a trash can, either on my Windows workstation or on the server - ...
13
votes
9answers
49k views

Unable to delete folder in windows 7?

I'm unable to delete some folder on my external hard disk. I tried them to delete in safe mode too but I'm not able to perform this. This is a big headache to me now. Even I'm the admin and it still ...
13
votes
3answers
6k views

How to delete an invincible 0 byte file?

I have a file whose size is 0 bytes. When I try to remove it an error message appears, saying "Could not find file". Here is the list of things I've tried to delete the file: Rebooted Reset folder ...
12
votes
3answers
10k views

How to secure delete file or folder in windows?

How do I securely delete (i.e., permanently delete) a file and/or folder in Windows? Secure in terms that the deleted file/folder can not be restored. Can you recommend any free or open source tool? ...
12
votes
2answers
5k views

Automatically deleting old files from recycling bin while keeping the new ones?

I want an explorer add-on which will delete old files from recycling bin after a time period. For example, I want to set the time limit to 30 days. When I delete a file in Windows, the software will ...
11
votes
2answers
11k views

.dropbox files, can they be deleted?

I use Dropbox on my Windows 7, OS X and on my mobile phone. Sometimes I see a file called .dropbox in my dropbox folders, can those files be deleted?
11
votes
5answers
8k views

How do I trim my Time Machine backups and find and exclude frequently-updated large files from bloating it?

Time Machine is nice because it Just Works and it does its magic in the background. But left to itself, it can really swell up due to either large files that you don't really need backed up slipping ...
11
votes
4answers
3k views

How to set a Linux Ditribution to self-destruct (to wipe everything from the system partition) via a script

I know this is a rather strange question, but I actually need to implement something like this for work. I shall be helping to facilitate a course that uses licensed software. The software is somewhat ...
10
votes
6answers
10k views

How to delete all but one file in Unix? [duplicate]

Possible Duplicate: How to delete all files in a directory except some? How to delete all but one(or some) file in Unix? Something like rm -rf -ignore myfile.txt *
10
votes
7answers
13k views

Can't delete folder in Windows 7

I'm trying to delete a folder in Windows 7 and get a perplexing error message: "Could not find this item: This is no longer located in G:\Graphics. Verify the item's location and try again. I can ...
10
votes
4answers
6k views

How to delete (invalid) files with colon in their name under Windows?

I've got a rather large number of files on my Windows drive that have a colon in their name. (These came from unpacking some Unix archives.) When I try to delete them, Windows (XP) complains that ...
10
votes
2answers
5k views

do files in the temporary folders get automatically deleted?

We are thinking to make our web application hosted on a windows server 2003 machine create temporary files, and "leave" it there as such. We won't manually take any action on them. So will these files ...
10
votes
2answers
862 views

User RECYCLER folders have thousands of hidden files

We have a "Users" folder that is the root of all user files and network profiles. Using a directory size utility (WinDirStat), I stumbled upon a strange and worrisome problem - thousands of files ...
10
votes
1answer
237 views

Why is deletion speed in Windows periodic often?

Just out of interest, what is the reason for deletion times to be periodic often? In Windows 8, the deletion dialogue window shows deletion speed in a diagram. If there is no reason, of course that ...
10
votes
3answers
1k views

Mac OS X: How can I see who is using the files I'm trying to delete?

I have a couple of files that I want to delete. So I select them and then do Move to Trash. However, when I do so I get this message: Some of the items you are moving are in use by another ...
9
votes
9answers
2k views

Is there a program to truly delete all deleted files?

I know that on the windows operating system, when you delete a file it's still recoverable. I'd like to avoid simply paving the harddrive with zeros as I would like to keep my OS installation as is, ...
9
votes
9answers
3k views

How can I speed up the deleting of very large directories on XP?

I regularly check out incredibly huge directories onto my XP machine. When it comes down to deleting and finally trashing them, it takes forever. Is there any way to speed this process up?
9
votes
5answers
9k views

How to safely delete stuff from %SystemDrive%\Windows\Installer? [duplicate]

Possible Duplicate: Is it safe to delete from C:\Windows\Installer? How can I safely delete OR shrink OR delete from the %SystemDrive%\Windows\Installer folder? Don't tell me to go to ...
8
votes
2answers
228 views

Why is the file deleted not actually deleted from the hard drive?

From an article on file recovery I read, that when a file is deleted on your computer, only a pointer to the file is deleted and the space occupied by the file is marked as free to use. Is the only ...
8
votes
3answers
2k views

How can I remove a folder without a name in Win7?

I use Windows 7. The problem can be seen from the picture. I have tried to remove the folder "by mouse". But I failed to do so. How can I remove the folder without a name? UPDATE: Thanks to Nifle's ...
8
votes
4answers
2k views

How to recover open but deleted file on Linux using ln instead of cp?

I have a file that's downloading (from a source that's hard to re-download from), but accidentally deleted from the filesystem namespace (/tmp/blah), and I'd like to recover this file. Normally I ...
8
votes
5answers
322 views

Media Sanitation

What is considered the minimum amount of overwrites to sanitize media? For example; there are 1, 2, 3, 7, and 35 overwrites methods to make data irrecoverable. Using standard recovery methods (such ...
8
votes
5answers
16k views

How do I delete Windows.old in Windows 7?

I used to run Windows 7 32 bit, but installed the 64 bit version because of a RAM upgrade. During the installation I got this message: The partition you selected might contain files from a ...
8
votes
4answers
41k views

Whay can't I delete files that “do not exist”, but appear in my download directory?

There are three videos that I've downloaded. I moved them to a different folder where I put all my videos, however a copy of the files still show up in my download directory. I tried (in Explorer ...
8
votes
3answers
12k views

How to find which files and folders were deleted recently in Linux?

I am having one particular folder (/home/sam/officedocuments) which is having hundreds of folders and files. I think I deleted some files and folders by mistake but I'm not sure. How to find which ...
8
votes
1answer
590 views

Cannot delete folder - Content seems to be nested recursively

I cannot delete a folder located on my hard disk by any means. I don't quite know how it was created, all I know is, that it is a pretty deep structure of folders (too deep to delete it at once, ...
7
votes
7answers
5k views

Can't delete file named ЃϵϳЅЂϿϽϯІχϯπρЂϻϵЉЃϵϳЅ, what to do?

I installed Windows 7 over the top of XP and it left me with a Windows.old folder. I tried to delete it, and it got rid of everything except two files named: ЃϵϳЅЂϿϽϯІχϯπρϴϱЄϱЃϵϳЅ ...
7
votes
5answers
13k views

What's wrong with my bash script to keep last x files and delete the rest?

I have this bash script which nicely backs up my database on a cron schedule: #!/bin/sh PT_MYSQLDUMPPATH=/usr/bin PT_HOMEPATH=/home/philosop PT_TOOLPATH=$PT_HOMEPATH/philosophy-tools ...
7
votes
6answers
19k views

How can I delete all files/subfolders in a given folder via the command prompt?

I would like to delete all files and subfolders in a batch file in Windows 7 and keep the top folder. Basically emptying the folder. What's the command line instruction for that?
7
votes
4answers
19k views

Delete URL history in Google Chrome

I'm looking for a way to delete a whole URL in Google Chrome. Do I need to run some other program or can it be done in the browser itself?
7
votes
4answers
6k views

Quickest way to merge snapshots in VirtualBox?

I have vdi with quite a number of snapshots taken from it - say, 50 or 70 snapshots. I want to have one plain vdi with a current state. These snapshots take way too much disk space and are not needed ...
7
votes
7answers
10k views

How can I delete permanently My Folders in Windows 7?

How can I delete permanently My Music/My Pictures/My Videos/etc. Folders in Windows 7? If you delete this folders manually, Windows Media Player 12 recreate all of them again, again and again! It's a ...
6
votes
3answers
2k views

How to Recursively Remove .svn Directories?

How do I recursively delete all .svn directories, starting with the directory I am in?
6
votes
5answers
2k views

How do I delete the next line in vim?

In emacs, whenever I want to delete a few lines of text, I just use C-k until all the text is gone. However, in vim it seems a bit more complex. I know I can do d$ to delete until the end of the ...
6
votes
3answers
6k views

How to delete file with this name on linux: -]???????q

Somehow a file named -]???????q got created on my terminal. I tried rm -f "-]???????q" (in double quotes), but it did not get deleted. (Error:: rm: invalid option -- ]). How do I delete it?
6
votes
3answers
4k views

What's the equivalent to 'rm -rf' with Windows command?

I need to delete a whole directory (with a lot of sub directories and files) by running a command in a batch file. I tried delete and erase, but both of them requires me to answer 'Y/N', and it ...