3

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

/etc/apt/sources.list.d/google-earth.list.save
/home/jatin/google-earth-stable_current_i386.deb
/home/jatin/google-earth-stable_current_i386.deb.1
/home/jatin/.cache/software-center/piston-helper/rec.ubuntu.com,api,1.0,recommend_app,google-earth-stable,,13c5f00780e1a1b88538de42b80aaada
/home/jatin/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,any,any,any,google-earth-stable,page,1,helpful,,ea694de2da0c9426e7b795c702d8b1d2
/home/jatin/Desktop/Debians/google-earth-stable_current_amd64.deb
/home/jatin/Downloads/google-earth-stable_current_amd64.deb
/usr/share/icons/oxygen/128x128/mimetypes/application-vnd-google-earth-kml.png
/usr/share/icons/oxygen/16x16/mimetypes/application-vnd-google-earth-kml.png
/usr/share/icons/oxygen/22x22/mimetypes/application-vnd-google-earth-kml.png
/usr/share/icons/oxygen/32x32/mimetypes/application-vnd-google-earth-kml.png
/usr/share/icons/oxygen/48x48/mimetypes/application-vnd-google-earth-kml.png
/usr/share/icons/oxygen/64x64/mimetypes/application-vnd-google-earth-kml.png
/usr/share/mime/application/vnd.google-earth.kml+xml.xml
/usr/share/mime/application/vnd.google-earth.kmz.xml
/var/cache/apt/archives/google-earth-stable_6.0.3.2197-r0_amd64.deb

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

2
  • 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
5

Why not use rm ?

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

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.

0

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

2
  • 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
0

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.