cannot update unless on one network

I am recently using ubuntu12.04 LTS and as I try to update, install apps and upgrade, I get error messages unless I am on one network. This is a wifi network that is found at my work place, I think there is an application installed to do that. Any how, this is all I get when trying to update in other networks.`eventhough its not all of it

Err http://deb.playonlinux.com maverick Release.gpg                            
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.opera.com stable Release.gpg                                    
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://repo.steampowered.com precise Release.gpg                           
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://fl.archive.ubuntu.com precise Release.gpg                           
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net karmic Release.gpg                                
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://extras.ubuntu.com precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable Release.gpg                                    
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security Release                        
Ign http://archive.getdeb.net precise-getdeb Release                           
Ign http://deb.opera.com stable Release                                        
Ign http://deb.playonlinux.com maverick Release                                
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://repo.steampowered.com precise Release                               
Err http://fl.archive.ubuntu.com precise-updates Release.gpg                   
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable Release.gpg                                    
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://extras.ubuntu.com precise Release                                   
Ign http://deb.playonlinux.com maverick/main i386 Packages/DiffIndex           
Ign http://security.ubuntu.com precise-security/main Sources/DiffIndex         
Ign http://archive.getdeb.net precise-getdeb/apps i386 Packages/DiffIndex      
Ign http://deb.opera.com stable/non-free i386 Packages/DiffIndex               
Ign http://repo.steampowered.com precise/steam i386 Packages/DiffIndex         
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable Release.gpg                                    
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://fl.archive.ubuntu.com precise-backports Release.gpg                 
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://extras.ubuntu.com precise/main Sources/DiffIndex                    
Ign http://deb.playonlinux.com maverick/main TranslationIndex                  
Ign http://archive.getdeb.net precise-getdeb/apps TranslationIndex             
Ign http://security.ubuntu.com precise-security/restricted Sources/DiffIndex   
Ign http://deb.opera.com stable/non-free TranslationIndex                      
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://repo.steampowered.com precise/steam TranslationIndex                
Ign http://dl.google.com stable Release                                        
Ign http://extras.ubuntu.com precise/main i386 Packages/DiffIndex              
Err http://fl.archive.ubuntu.com precise-proposed Release.gpg                  
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security/universe Sources/DiffIndex     
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://dl.google.com stable Release                                        
Ign http://fl.archive.ubuntu.com precise Release                               
Ign http://extras.ubuntu.com precise/main TranslationIndex                     
Ign http://security.ubuntu.com precise-security/multiverse Sources/DiffIndex   
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://dl.google.com stable Release                                        
Ign http://fl.archive.ubuntu.com precise-updates Release                       
Ign http://security.ubuntu.com precise-security/main i386 Packages/DiffIndex   
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-backports Release                     
Ign http://dl.google.com stable/main i386 Packages/DiffIndex                   
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-proposed Release                      
Ign http://dl.google.com stable/main TranslationIndex                          
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://dl.google.com stable/main i386 Packages/DiffIndex                   
Ign http://fl.archive.ubuntu.com precise/main Sources/DiffIndex                
Ign http://fl.archive.ubuntu.com precise/restricted Sources/DiffIndex          
Ign http://fl.archive.ubuntu.com precise/universe Sources/DiffIndex            
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://dl.google.com stable/main TranslationIndex                          
Ign http://fl.archive.ubuntu.com precise/multiverse Sources/DiffIndex          
Ign http://fl.archive.ubuntu.com precise/main i386 Packages/DiffIndex          
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://dl.google.com stable/main i386 Packages/DiffIndex                   
Ign http://fl.archive.ubuntu.com precise/restricted i386 Packages/DiffIndex    
Ign http://fl.archive.ubuntu.com precise/universe i386 Packages/DiffIndex      
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://dl.google.com stable/main TranslationIndex                          
Ign http://fl.archive.ubuntu.com precise/multiverse i386 Packages/DiffIndex    
Ign http://fl.archive.ubuntu.com precise/main TranslationIndex                 
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security/restricted i386 Packages/DiffIndex
Ign http://security.ubuntu.com precise-security/universe i386 Packages/DiffIndex
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.opera.com stable/non-free i386 Packages                         
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security/multiverse i386 Packages/DiffIndex
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security/main TranslationIndex          
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security/multiverse TranslationIndex    
Ign http://security.ubuntu.com precise-security/restricted TranslationIndex    
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise/multiverse TranslationIndex           
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://security.ubuntu.com precise-security/universe TranslationIndex      
Ign http://fl.archive.ubuntu.com precise/restricted TranslationIndex           
Ign http://fl.archive.ubuntu.com precise/universe TranslationIndex             
Err http://extras.ubuntu.com precise/main Sources                              
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/main Sources/DiffIndex        
Err http://repo.steampowered.com precise/steam i386 Packages                   
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/restricted Sources/DiffIndex  
Err http://repo.steampowered.com precise/steam Translation-en_US               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://extras.ubuntu.com precise/main i386 Packages                        
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/universe Sources/DiffIndex    
Err http://repo.steampowered.com precise/steam Translation-en                  
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/multiverse Sources/DiffIndex  
Err http://extras.ubuntu.com precise/main Translation-en_US                    
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/main i386 Packages/DiffIndex  
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://extras.ubuntu.com precise/main Translation-en                       
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/restricted i386 Packages/DiffIndex
Ign http://fl.archive.ubuntu.com precise-updates/universe i386 Packages/DiffIndex
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.opera.com stable/non-free Translation-en_US                     
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.opera.com stable/non-free Translation-en                        
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.playonlinux.com maverick/main i386 Packages                     
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://archive.getdeb.net precise-getdeb/apps i386 Packages                
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://archive.getdeb.net precise-getdeb/apps Translation-en_US            
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.playonlinux.com maverick/main Translation-en_US                 
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://archive.getdeb.net precise-getdeb/apps Translation-en               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://deb.playonlinux.com maverick/main Translation-en                    
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/multiverse i386 Packages/DiffIndex
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-updates/main TranslationIndex         
Ign http://fl.archive.ubuntu.com precise-updates/multiverse TranslationIndex   
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://ppa.launchpad.net precise Release.gpg                               
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://ppa.launchpad.net karmic Release                                    
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://fl.archive.ubuntu.com precise-updates/restricted TranslationIndex   
Ign http://fl.archive.ubuntu.com precise-updates/universe TranslationIndex     
Ign http://fl.archive.ubuntu.com precise-backports/main Sources/DiffIndex      
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://fl.archive.ubuntu.com precise-backports/restricted Sources/DiffIndex
Ign http://fl.archive.ubuntu.com precise-backports/universe Sources/DiffIndex  
Ign http://ppa.launchpad.net precise Release                                   
Ign http://fl.archive.ubuntu.com precise-backports/multiverse Sources/DiffIndex
Ign http://fl.archive.ubuntu.com precise-backports/main i386 Packages/DiffIndex
Err http://dl.google.com stable/main i386 Packages                             
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-backports/restricted i386 Packages/DiffIndex
Ign http://fl.archive.ubuntu.com precise-backports/universe i386 Packages/DiffIndex
Err http://dl.google.com stable/main Translation-en_US                         
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://fl.archive.ubuntu.com precise-backports/multiverse i386 Packages/DiffIndex
Ign http://fl.archive.ubuntu.com precise-backports/main TranslationIndex       
Err http://dl.google.com stable/main Translation-en                            
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable/main i386 Packages                             
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable/main Translation-en_US                         
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable/main Translation-en                            
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Err http://dl.google.com stable/main i386 Packages                             
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://ppa.launchpad.net precise Release                                   
Err http://dl.google.com stable/main Translation-en_US                         
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://ppa.launchpad.net precise Release                                   
Err http://dl.google.com stable/main Translation-en                            
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://fl.archive.ubuntu.com precise-backports/multiverse TranslationIndex 
Ign http://fl.archive.ubuntu.com precise-backports/restricted TranslationIndex 
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   
Ign http://ppa.launchpad.net precise Release                                   

Err http://security.ubuntu.com precise-security/multiverse Translation-en_US   
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://ppa.launchpad.net precise/main i386 Packages/DiffIndex              
Err http://security.ubuntu.com precise-security/multiverse Translation-en      
  Something wicked happened resolving 'aptcache.intranet.ics:3142' (-5 - No address associated with hostname)
Ign http://ppa.launchpad.net precise/main TranslationIndex                     
Ign http://ppa.launchpad.net precise/main Sources/DiffIndex                    
Ign http://ppa.launchpad.net precise/main i386 Packages/DiffIndex              
Ign http://ppa.launchpad.net precise/main TranslationIndex                     
Ign http://ppa.launchpad.net precise/main Sources/DiffIndex                    
Ign http://ppa.launchpad.net precise/main i386 Packages/DiffIndex              
Ign                   
22% [Connecting to aptcache.intranet.ics] [Connecting to aptcache.intranet.ics]
`

Solution 1:

It looks like you have configured apt to use a caching proxy on your workplace intranet. When you are not connected to that network, the proxy settings are invalid and the updates/installs will fail.

The best way to fix that will depend how often you update your system at work versus away from work, either:

  1. If you usually update at work, but want to run apt-get occasionally when your connected to another network, you should be able to override the configuration setting on the command line by adding -o Acquire::http::Proxy=false to the command e.g.

    sudo apt-get -o Acquire::http::Proxy=false update
    
  2. If you rarely use the work proxy, then you could consider removing or disabling it altogether: this is probably easiest using the synaptic package manager, by going to Settings-->Preferences and then selecting the Network tab, and making sure it is set to Direct connection to the internet:

    Synaptic proxy settings

    If you don't have synaptic you can edit the proxy settings manually - you should find them either in file /etc/apt/apt.conf or one of the fragments in /etc/apt/apt.conf.d/ and it will probably look something like

    Acquire::http::Proxy "http://aptcache.intranet.ics:3142"
    

    which you can either comment out, or explicitly set to

    Acquire::http::Proxy DIRECT
    
  3. If you want apt to auto-detect whether the specified proxy is available, and make a direct connection if it isn't, then apparently there is a way to do that as well - see this previous answer at How do I ignore a proxy if not available?