I am using ubuntu 12.04 lts and i want to remove the following files using the terminal:


and they are scattered in the computer. is there a command to remove them all at once?

  • You asked before how to format a block of text. Start editing, select the block of text and press the <$> button to format the whole block of text with one click.
    – karel
    Mar 8 '14 at 13:45
  • Don't delete the files inside (/usr/share) manually .It will break your system.If you want to remove a package then run sudo apt-get purge package command. Mar 8 '14 at 13:54

Why not use rm ?

sudo rm path/to/file1 path/to/file2 

If you found the list of files you pasted on the question somehow, you can use rm to delete all of them at one go using the following:

Copy the list of files to gedit(paste using Ctrl+v) and then replace(Ctrl+h) newlines(\n) by a space (' ') and then copy the text and type rm and paste the copied text.


From what I see in your list of files it seems that you installed google-earth-stable directly from a deb package (/home/jatin/google-earth-stable_current_i386.deb).

If what you want to achieve is removing the package from your computer, type sudo dpkg -r google-earth-stable

  • it says: dpkg: warning: there's no installed package matching google-earth-stable
    – Jatttt
    Mar 8 '14 at 13:50
  • How did you install google-earth-stable? using the Software center? If so, you can easily remove it from the Software Center. For files in /home/jatin, like suggested just use rm to delete them. Mar 8 '14 at 13:54

It looks like you copy and pasted that list of files from somewhere. If it's the output of a command you ran in the terminal, you can pipe this output to xargs rm.

But before you do that, I see files in /usr/share/ in your list, which suggest they were installed by a package, apparently google-earth-stable. First uninstall that:

sudo apt-get remove --purge google-earth-stable

Once that's done, run your (search?) command again and pipe it to xargs rm like this:

your_search_cmd | xargs rm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.