We’re rewarding the question askers & reputations are being recalculated! Read more.
229

Your sources.list really has duplicate entries. First Let's see the correct form of a repository line or source line: The correct format of repository source line is <type of repository> <location> <dist-name> <components> For example, a repo line can be like this one deb http://archive.ubuntu.com/ubuntu precise main Here, ...


201

If you want in one command and not use Software source ticking then in terminal put: sudo add-apt-repository universe On older versions of Ubuntu, you might have to use a full source line: sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" To enable all Ubuntu software (main universe restricted multiverse) ...


165

Or from the terminal - sudo add-apt-repository -r ppa:<ppa to remove> Or, edit the /etc/apt/sources.list to find your ppa there, and remove from there manually (or automatically). Or, remove the ppa file from /etc/apt/sources.list.d in newer versions of Ubuntu.


121

You can use this trick. Open a terminal ( Pressing Ctrl+Alt+T ) and do these Move the corrupted one to the safe place sudo mv /etc/apt/sources.list ~/ and recreate it sudo touch /etc/apt/sources.list Open Software & Updates software-properties-gtk This will open software-properties-gtk with no repository selected. Then, change the server to Main ...


101

Go to https://repogen.simplylinux.ch. Select your Country and Ubuntu Release. For the default set of repositories, you need to enable these repositories. All of the Ubuntu Branches repositories. Security - Important Security Updates. Security Sources Repository Updates - Recommended Updates Updates Sources Repository If you want to install software from ...


96

Open your sources.list file using your favorite text editor, e.g. sudo nano /etc/apt/sources.list Locate the text http://us.archive.ubuntu.com/ubuntu and replace it with http://archive.ubuntu.com/ubuntu.


82

yes, apt-get can do that, and can do it in a nice way. Append following to ~/.bash_funcs update-repo() { for source in "$@"; do sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/${source}" \ -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" done } Append following to ~/.bashrc if [ -f $HOME/.bash_funcs ]; ...


80

For Ubuntu 12.04 Graphically: Press Alt + F2 and paste software-properties-gtk (or you can open "Software Center" then go to "Edit" > "Software Sources"). Go to tab "Other Software", choose the duplicate entry and press the "Remove" button. If you need a command line option, here it is: cat /etc/apt/sources.list | perl -ne '$H{$_}++ or print' &...


58

Run command: sudo apt-get update For every 16-character key that is reported as missing, run the following with the key substituted: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABCDEFGH12345678


55

This command should do the trick: sudo sed -i 's|http://us.|http://|g' /etc/apt/sources.list It will remove the 'us.' prefix in each of the addresses to convert them to addresses of the main server. Of course replace 'us' by any other mirror you are using. In depth explanation of command: sed - stream editor for filtering and transforming text. The -i ...


53

The short answer: The APT preferences file /etc/apt/preferences can be used to control which versions of packages will be selected for installation. Here is the file /etc/apt/preferences, which apt-get use to decide, which version it's have to select if there are many versions of a single packge. With this, any package that comes from the local ...


49

Yes, names of files in /etc/sources.list.d must end in .list for lines in the files to be taken as specifying software sources that ought to be used. Otherwise, the files may be taken to have a different meaning. sources.list From man sources.list (1): NAME sources.list - Package resource list for APT DESCRIPTION The package resource ...


49

Another option available for newer releases of Ubuntu: sudo apt-add-repository multiverse && sudo apt-get update From the man page: Examples: apt-add-repository 'deb http://myserver/path/to/repo stable myrepo' apt-add-repository 'http://myserver/path/to/repo myrepo' apt-add-repository 'https://packages.medibuntu.org free non-free' apt-add-...


47

First, open software center. Click on 'edit' and then 'software sources' to open the software sources window. Once that is open, check the box that says, "Community-maintained free and open-source software (universe)." Now, all the universe packages should show up in software center just like all the other ones. More information: How do I enable the "...


43

The Multiverse repository contains packages (software) that is "not free" , referring to licensing restrictions. The Multiverse repository contains software which has been classified as non-free. This software may not be permitted in some jurisdictions. When installing each package from this repository, you should verify that the laws of your country ...


41

If the repository is configured in a specific file in the directory /etc/apt/sources.list.d/, say myrepo.list, you can update that single repository with the command: sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/myrepo.list" \ -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" Nevertheless this is not very convenient. This can be ...


38

The error indicates a malformed entry in a source file, which causes the update process to abort. To fix it, you have to either fix the entry (if you know what the right entry should look like) or remove it altogether (that's what I'm going to describe, as it's the fastest way to enable you to update your system again). First, you need to open the file ...


33

I finally found answer myself. To put all ubuntu sources to work without clicking them just enter in terminal sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse" So for just "Universe" would be sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" You ...


32

I think you are looking for pkg-config (with the dash), see dpkg -l | grep pkg-config.


30

Command-line/Server Instructions Backports are enabled by default, here's how you can check to make sure they are turned on. Ensuring Backports are enabled To enable the backports manually make sure the following line is in your /etc/apt/sources.list: deb http://archive.ubuntu.com/ubuntu release-backports main restricted universe multiverse ...


30

Command Line Way of enabling Ubuntu software Repositories For 12.10 and above: To enable main repository, sudo add-apt-repository main To enable universe repository, sudo add-apt-repository universe To enable multiverse repository, sudo add-apt-repository multiverse To enable restricted repository, sudo add-apt-repository restricted NOTE: After ...


28

You need to add them all back/re-enabled them individually by uncommenting the lines in the files in the /etc/apt/sources.list.d/ directory. Though upgrade time is a good time to reevaluate if you need the PPA in the first place if you were just using one to get a newer version of a package.


27

I was facing the same problem and figured the easiest solution is to reset the sources of /etc/apt/sources.list. To do so, follow these steps: Obtain the release of your Ubuntu version, type into the console: lsb_release -r Go to http://repogen.simplylinux.ch/ to generate a new sources.list Select your country & release Check the first 12 boxes: ...


25

Edit /etc/resolv.conf. In a Terminal window run sudo gedit /etc/resolv.conf and add the line nameserver 8.8.8.8 and save. Then do ping www.google.com If this succeeds then run the following commands sudo apt-get --download-only --reinstall install resolvconf sudo dpkg --purge --force-depends resolvconf sudo apt-get install resolvconf If resolving now ...


24

As of Ubuntu 12.10, you can run: sudo add-apt-repository universe Which is easier than running sed over sources.list files, and will take into account which of -updates/-proposed/-backports is enabled. You can go back with the --remove flag, but you'll still have to remove the packages: sudo aptitude purge '~i ~s universe/'


24

How bad are duplicate entries in sources.list? I don’t know how bad it is, but i don’t like sudo apt-get update showing me duplicate entries. By the way its not that bad, its just showing you that you have duplicate entries. SourcesList The sources.list file is a key factor in adding or upgrading applications to your Ubuntu installation. This is also ...


22

Yes, the name server update does work and if it does work then you've probably updated your IP settings to be static and your server can no longer resolve URLs. Try the above and if it works, reboot. If it fails after rebooting, then do this: Edit the template file for the resolv.conf. Ubuntu server rebuilds this every boot. sudo vi /etc/resolvconf/...


21

By default there will be a backup for your sources.list file on the same directory itself. sudo cp /etc/apt/sources.list.save /etc/apt/sources.list Answer from similar question here: https://askubuntu.com/a/465210/150936


21

As of 2018-12-19 08:07 there is a new winehq.key keyfile as mentioned here. Download the new repository key and add it to the list of trusted keys: cd /tmp wget -nc https://dl.winehq.org/wine-builds/winehq.key sudo apt-key add winehq.key sudo apt update As mentioned by @jason-hunter in a comment, apt update will ask if you accept the changes in the ...


20

From the command line without using a text editor or GUI: sudo sed -i "/^# deb.*multiverse/ s/^# //" /etc/apt/sources.list http://alestic.com/2012/05/aws-command-line-packages


Only top voted, non community-wiki answers of a minimum length are eligible