How to enable Disabled third party sources from command line after upgrade

32,682

I manage my sources manually from cli using a regular text editor like vim or nano.

The main sources.list is located here:

/etc/apt/sources.list

and most third party sources are at:

/etc/apt/sources.list.d/

you can simply use a text editor to edit and enable them (uncomment):

sudo nano /etc/apt/sources.list.d/sample-sources.list

there should be lines like:

# deb http://ppa-url.com/ubuntu trusty main

you should uncomment them (remove #):

deb http://ppa-url.com/ubuntu trusty main

then the save the edited file and run sudo apt update.

Share:
32,682

Related videos on Youtube

The Coder
Author by

The Coder

Updated on September 18, 2022

Comments

  • The Coder
    The Coder over 1 year

    I've upgraded from 14.04 to 16.04. As per the upgrade instruction, third party sources were disabled. After the upgrade, I cannot find a possible way to enable those third party sources using command line instead of System Settings > Software & Updates > Other Software.

    I need to do it on command line because changing it via Settings requires password of a Super Privileged user (idk if that's the exact term). I can do all of the sudo and sudo su stuffs in command line with my current login, even though I've upgraded to 16.04 using sudo do-release-upgrade (Weird right..!? idk why sysadmin set up that restriction in first place).

    Also another possible solution I think of is to reinstall those packages again which will re-enable those sources I guess.

    • Zanna
      Zanna almost 7 years
      it's the same password as you use for sudo...
    • The Coder
      The Coder almost 7 years
      @Zanna, Nope, I'm admin, but the super privileged requires password for sysadmin.
  • The Coder
    The Coder almost 7 years
    @Ravexina, one small qn, what do i do with those .distUpgrade and .save files? Like this one cwchien-gradle-trusty.list.distUpgrade, cwchien-gradle-trusty.list.save..
  • Ravexina
    Ravexina almost 7 years
    @TheCoder They should be backup files, leave them be there in case you messed something up.