We recommend rebuilding in two scenarios: In some scenarios, it’s simpler to destroy the current Droplet and create a new one. This is an option if you’re concerned that your Droplet has been compromised, you’ve lost access to it, you’d like to switch operating system versions, or you’d like to completely replace the contents of a Droplet. Rebuilding a Droplet wipes the Droplet’s disk and replaces it with an image you select. Each Droplet you create is a new server you can use, either standalone or as part of a larger, cloud-based infrastructure. Recreate the directory: sudo mkdir /etc/apt/ Droplets are Linux-based virtual machines (VMs) that run on top of virtualized hardware. Move the directory containing the PPA files to the ~/answer directory: sudo mv /etc/apt// ~/answer If after restoring the repositories, you're still facing errors then you need to remove all the PPA files too.
Replace the sources.list: sudo mv ~/answer/sources.list /etc/apt/īy default, the directory which contains all the PPA files is empty. cd ~/answer/Ĭhange the sources.list to match your version: sudo sed -i "s/focal/$(lsb_release -c -s)/" ~/answer/sources.listīackup your current sources.list: sudo mv /etc/apt/sources.list /etc/apt/ Here is a better way to get all the default repositories back.Ĭreate a directory where we can run our commands: sudo mkdir ~/answerĭownload the sources.list for Ubuntu 20.04 focal.
#Cara mengembalikan file yang ke replace install
This will update your repository index with the current sources.list and then you can install any software using Software Center, Synaptic or apt-get. sudo mv /etc/apt/sources.list /etc/apt/Ĭopy/paste all the text from the newly generated sources.list to this file. Run the following commands in a Terminal. Replace the old sources.list with the new one Now, click the Generate List button at the bottom of that page and you'll see your generated sources.list. If you want to install software from Canonical Partner Repositories (closed source software), enable the Ubuntu Partner Repositories (both of them).Įnable any 3rd party repository you wish to enable.
# Ubuntu Main Reposĭeb precise main restricted universe multiverseĭeb-src precise main restricted universe multiverseĭeb precise-security main restricted universe multiverseĭeb precise-updates main restricted universe multiverseĭeb precise-proposed main restricted universe multiverseĭeb precise-backports main restricted universe multiverseĭeb-src precise-security main restricted universe multiverseĭeb-src precise-updates main restricted universe multiverseĭeb-src precise-proposed main restricted universe multiverseĭeb-src precise-backports main restricted universe multiverse This is the sources.list file for 12.04 Precise Pangolin. (This image is later added from Ubuntu xenial, so there can be some differences) I recommend selecting the security and updates channels at least. To do so, switch to Updates tab and select one or more updates channel. You must enable some repositories from the new window in order to create a new sources.list file in /etc/apt/.Īfter enabling some sources from Ubuntu software tab, you can enable updates. Then, change the server to Main server or to any other server of your choice. This will open software-properties-gtk with no repository selected. Open Software & Updates software-properties-gtk Move the corrupted one to the safe place sudo mv /etc/apt/sources.list ~/Īnd recreate it sudo touch /etc/apt/sources.list Open a terminal ( Pressing Ctrl+ Alt+ T ) and do these