How can I avoid "please insert CD/DVD" error when updating Ubuntu?

Solution 1:

Go to Ubuntu Software Center > Edit > Software Sources and make following changes: Uncheck the Cdrom option in Ubuntu Software.Also make sure that you have marked all the other options. Software Sources

Now go to Other Software and uncheck the Cdrom options. Software Sources

Now try running sudo apt-get update