I used sudo rm -r /etc/apt and my apt folder in file system got deleted because of which i am not able even to use Internet in terminal also.can any body suggest me how to back up my apt folder in file system
Little late to run backups now. Generally you should be backing up your important data before you destroy it.
I would suggest, in the following order:
I am a bit confused as to why you would be unable to use the Internet in your terminal - /etc/apt/ (essentially) only governs how you retrieve new Debian packages. Can you still do a 'ping www.google.com' from the command line? If that does not work, you have issues that go beyond a lost /etc/apt/
You should be able to recreate a working /etc/apt relatively easily - the only thing that you can't live without is /etc/apt/sources.list. There are also two directories that apt requires, but they can be empty.
Try the following:
In the last line, change 'stable' to whatever you are using, and add 'non-free' and/or 'contrib' at the end of the line, if needed.
Then do an
You'll still have to add any extra repositories you had in your sources.list, and and