vendredi 4 mai 2018

Install nodeJs using script


curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - 

sudo apt install -y nodejs                                                                

nodejs -v                                                                                         
v10.0.0 


That's it :-)

Find and remove obsolete PPA repositories



It happens sometimes , when running the update command

 sudo apt-get update


That we face some errors like :




This clearly indicates obsolete PPA repositories,To delete them, just run the following command :

1. List the obsolete PPA repositories  :

 sudo apt-get update | grep "Failed"
 E: The repository 'http://ppa.launchpad.net/colingille/freshlight/ubuntu bionic Release'    
 E: The repository 'http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu bionic  Release'    


2. Find the files containing ths obsolete PPA repository in the sources.list.d :


 - 2.1 PPA repo : http://ppa.launchpad.net/colingille/freshlight/ubuntu


 grep -rnw '/etc/apt/sources.list.d' \
  -e 'http://ppa.launchpad.net/colingille/freshlight/ubuntu bionic'




/etc/apt/sources.list.d/colingille-ubuntu-freshlight-bionic.list:1:deb http://ppa.launchpad.net/colingille/freshlight/ubuntu bionic main
/etc/apt/sources.list.d/colingille-ubuntu-freshlight-bionic.list:2:# deb-src http://ppa.launchpad.net/colingille/freshlight/ubuntu bionic main
/etc/apt/sources.list.d/colingille-ubuntu-freshlight-bionic.list.save:1:deb http://ppa.launchpad.net/colingille/freshlight/ubuntu bionic main
/etc/apt/sources.list.d/colingille-ubuntu-freshlight-bionic.list.save:2:# deb-src http://ppa.launchpad.net/colingille/freshlight/ubuntu bionic main

Comment or delete the PPA repository in the different listed files.