The board will go down for necessary maintenance at 12:00 PM UTC (see current UTC time). We expect to be back 1 hour later at 1:00 PM UTC. Apologies for any inconvenience.

Accidentally deleted a repository [Solved]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
LP2Lily
Level 1
Level 1
Posts: 13
Joined: Sat Jul 11, 2020 11:55 am
Location: MO

Accidentally deleted a repository [Solved]

Post by LP2Lily »

I have been using Linux for a while, but with my skills are spread out. My specialty is on the breadboard and programming micro-controllers. I am still learning the stuff under the hood of the Linux OS. Needless to say I added the Atom IDE repository and tried to remove it, but ended up removing all the repositories. Now the PPA's is blank after boot up. Not sure if its supposed to be that way in the software resources window. My system will update, but not entirely sure if it even has a mirror its checking if that makes sense. Like I said I am still learning what goes on under the hood. Any help in getting this fixed would be very much appreciated. Yes, I feel like a dork for deleting the wrong stuff on accident.

My system is Linux Mint Tera Specifically XFCE if that helps.
Last edited by LP2Lily on Mon Jul 13, 2020 9:14 am, edited 1 time in total.
Oh wait your serious? Let me laugh harder!! https://www.fathomisticfantasy.com/

sleeper12
Level 11
Level 11
Posts: 3596
Joined: Thu May 25, 2017 3:22 pm

Re: Accidentally deleted a repository

Post by sleeper12 »

You can try clicking 'Restore the default settings' in Software Sources.

User avatar
LP2Lily
Level 1
Level 1
Posts: 13
Joined: Sat Jul 11, 2020 11:55 am
Location: MO

Re: Accidentally deleted a repository

Post by LP2Lily »

sleeper12 wrote:
Sat Jul 11, 2020 4:10 pm
You can try clicking 'Restore the default settings' in Software Sources.
I did that a moment ago. I did come across some one who has the exact same system and a similar problem. Only his result of the terminal input/output below was different. Does this mean I am over reacting? I suppose I will find out soon enough when something breaks. My mother is classic in my family for saying, "don't google your symptoms." because she had a medical profession before she retired.
viewtopic.php?t=273168

Code: Select all

$ inxi -r
Repos:     Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
           deb http://packages.linuxmint.com tara main upstream import backport
           deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
           deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
           deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
           deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
           deb http://archive.canonical.com/ubuntu/ bionic partner
           Active apt sources in file: /etc/apt/sources.list.d/official-source-repositories.list
           deb-src http://packages.linuxmint.com tara main upstream import backport
           deb-src http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
           deb-src http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
           deb-src http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
           deb-src http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
           deb-src http://archive.canonical.com/ubuntu/ bionic partner
Oh wait your serious? Let me laugh harder!! https://www.fathomisticfantasy.com/

mr_raider
Level 7
Level 7
Posts: 1800
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Accidentally deleted a repository

Post by mr_raider »

Go through the following directories:

/etc/apt/sources
/etc/apt/sources.list.d

Every sources.list file should have sources.list.save file which is a timestamped backup. Just restore from those.
Image

User avatar
LP2Lily
Level 1
Level 1
Posts: 13
Joined: Sat Jul 11, 2020 11:55 am
Location: MO

Re: Accidentally deleted a repository

Post by LP2Lily »

mr_raider wrote:
Sat Jul 11, 2020 6:46 pm
Go through the following directories:

/etc/apt/sources
/etc/apt/sources.list.d

Every sources.list file should have sources.list.save file which is a timestamped backup. Just restore from those.
I might have misunderstood. I clicked add and then after letting it run its course I get this error. Yup, I am still learning.

https://scontent-ort2-1.xx.fbcdn.net/v/ ... e=5F327AFB
Oh wait your serious? Let me laugh harder!! https://www.fathomisticfantasy.com/

User avatar
zcot
Level 5
Level 5
Posts: 998
Joined: Wed Oct 19, 2016 6:08 pm

Re: Accidentally deleted a repository

Post by zcot »

Using the Software Sources program you can check the PPA's and Additional Repositories. Both of those can be empty without any issue.

In your case, after you removed the Atom IDE repo it just means that you will not get any updates that might happen to be pushed from that repository.

But you removed other PPA's or Additional Repositories, which is fine too, but if you had installed any particular software from one of the unmentioned ones that should be getting routine updates, say Google Chrome browser for example, then you would want to readd that repository source.

As for the default sources (see "Official Repositories" tab), you can simply use the restore button. After it refreshes you can change your mirrors to some globally nearby location of your choice.

mr_raider
Level 7
Level 7
Posts: 1800
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Accidentally deleted a repository

Post by mr_raider »

Do this

Code: Select all

cd /etc/apt/
then

Code: Select all

ls -la
then

Code: Select all

cd sources.list.d/
then

Code: Select all

ls -la

Post the outputs of the ls commands
Image

User avatar
LP2Lily
Level 1
Level 1
Posts: 13
Joined: Sat Jul 11, 2020 11:55 am
Location: MO

Re: Accidentally deleted a repository

Post by LP2Lily »

Code: Select all

lp2lily@lp2lily-HP-250-G2-Notebook-PC:~$ cd /etc/apt/
lp2lily@lp2lily-HP-250-G2-Notebook-PC:/etc/apt$ ls -la
total 44
drwxr-xr-x   7 root root  4096 Jul 10 21:13 .
drwxr-xr-x 148 root root 12288 Jul 11 15:17 ..
drwxr-xr-x   2 root root  4096 Jul 10 21:41 apt.conf.d
drwxr-xr-x   2 root root  4096 May 12 13:03 auth.conf.d
drwxr-xr-x   2 root root  4096 Jul 10 20:29 preferences.d
-rw-r--r--   1 root root    90 Jul 10 21:53 sources.list
drwxr-xr-x   2 root root  4096 Jul 12 13:49 sources.list.d
-rw-r--r--   1 root root   402 Jul 10 21:13 trusted.gpg
drwxr-xr-x   2 root root  4096 Jul 10 21:13 trusted.gpg.d
lp2lily@lp2lily-HP-250-G2-Notebook-PC:/etc/apt$ cd sources.list.d/
lp2lily@lp2lily-HP-250-G2-Notebook-PC:/etc/apt/sources.list.d$ ls -la
total 20
drwxr-xr-x 2 root root 4096 Jul 12 13:49 .
drwxr-xr-x 7 root root 4096 Jul 10 21:13 ..
-rw-r--r-- 1 root root  312 Jul 12 13:58 additional-repositories.list
-rw-r--r-- 1 root root  477 Jul 11 17:15 official-package-repositories.list
-rw-r--r-- 1 root root  501 Jul 11 17:15 official-source-repositories.list
lp2lily@lp2lily-HP-250-G2-Notebook-PC:/etc/apt/sources.list.d$ 
I did install Chrome because its what I am used to. I can add the repo stuff for that too. Also the above is the output of what was requested.
Oh wait your serious? Let me laugh harder!! https://www.fathomisticfantasy.com/

mr_raider
Level 7
Level 7
Posts: 1800
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Accidentally deleted a repository

Post by mr_raider »

LP2Lily wrote:
Sun Jul 12, 2020 4:13 pm

Code: Select all

lp2lily@lp2lily-HP-250-G2-Notebook-PC:~$ cd /etc/apt/
lp2lily@lp2lily-HP-250-G2-Notebook-PC:/etc/apt$ ls -la
total 44
drwxr-xr-x   7 root root  4096 Jul 10 21:13 .
drwxr-xr-x 148 root root 12288 Jul 11 15:17 ..
drwxr-xr-x   2 root root  4096 Jul 10 21:41 apt.conf.d
drwxr-xr-x   2 root root  4096 May 12 13:03 auth.conf.d
drwxr-xr-x   2 root root  4096 Jul 10 20:29 preferences.d
-rw-r--r--   1 root root    90 Jul 10 21:53 sources.list
drwxr-xr-x   2 root root  4096 Jul 12 13:49 sources.list.d
-rw-r--r--   1 root root   402 Jul 10 21:13 trusted.gpg
drwxr-xr-x   2 root root  4096 Jul 10 21:13 trusted.gpg.d
lp2lily@lp2lily-HP-250-G2-Notebook-PC:/etc/apt$ cd sources.list.d/
lp2lily@lp2lily-HP-250-G2-Notebook-PC:/etc/apt/sources.list.d$ ls -la
total 20
drwxr-xr-x 2 root root 4096 Jul 12 13:49 .
drwxr-xr-x 7 root root 4096 Jul 10 21:13 ..
-rw-r--r-- 1 root root  312 Jul 12 13:58 additional-repositories.list
-rw-r--r-- 1 root root  477 Jul 11 17:15 official-package-repositories.list
-rw-r--r-- 1 root root  501 Jul 11 17:15 official-source-repositories.list
lp2lily@lp2lily-HP-250-G2-Notebook-PC:/etc/apt/sources.list.d$ 
I did install Chrome because its what I am used to. I can add the repo stuff for that too. Also the above is the output of what was requested.
Crap. You don't have the backup files.
Image

sleeper12
Level 11
Level 11
Posts: 3596
Joined: Thu May 25, 2017 3:22 pm

Re: Accidentally deleted a repository

Post by sleeper12 »

If you're on Mint 20, maybe this might help:
https://easylinuxtipsproject.blogspot.c ... urces.html

User avatar
LP2Lily
Level 1
Level 1
Posts: 13
Joined: Sat Jul 11, 2020 11:55 am
Location: MO

Re: Accidentally deleted a repository

Post by LP2Lily »

I have a new idea. Not sure how to do it though. I don't like the "rm" command. I killed my Linux machine when I was first learning the terminal cmd several years ago. Let me tell ya that was not fun. However, I do know that there is a way to remove things in a file manager window. I forgot how to get there though. Its a super user window you have to type a password for. If I delete the doubles could that fix the problem?


https://scontent-ort2-1.xx.fbcdn.net/v/ ... e=5F3093D4
Oh wait your serious? Let me laugh harder!! https://www.fathomisticfantasy.com/

User avatar
LP2Lily
Level 1
Level 1
Posts: 13
Joined: Sat Jul 11, 2020 11:55 am
Location: MO

Re: Accidentally deleted a repository

Post by LP2Lily »

sleeper12 wrote:
Sun Jul 12, 2020 9:37 pm
If you're on Mint 20, maybe this might help:
https://easylinuxtipsproject.blogspot.c ... urces.html
Hang on I think your on to something. I think now I do feel like a dork. Check this out.

Code: Select all

lp2lily@lp2lily-HP-250-G2-Notebook-PC:~$ sudo apt-get update
[sudo] password for lp2lily:              
Ign:1 http://packages.linuxmint.com tara InRelease
Hit:2 http://packages.linuxmint.com tara Release                                                                                                              
Hit:4 http://archive.canonical.com/ubuntu bionic InRelease                                                                                                    
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                                                    
Hit:6 http://archive.ubuntu.com/ubuntu bionic InRelease  
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]           
Hit:8 http://archive.ubuntu.com/ubuntu bionic-backports InRelease                    
Fetched 177 kB in 3s (54.2 kB/s)                   
Reading package lists... Done
lp2lily@lp2lily-HP-250-G2-Notebook-PC:~$ 

"Boom, big reveal. I turned myself into a pickle. PICKLE RICK!!!!" Yea, if I never googled my symptoms I would have never tried to replace repositories. I probably would have tried this update command a long time ago. Just like the link Sleeper provided had mentioned, Remove the repositories. In the code provided above it still reads the sources; however, the box's are unticked in the software sources window.
Oh wait your serious? Let me laugh harder!! https://www.fathomisticfantasy.com/

Post Reply

Return to “Newbie Questions”