0

so, I'm not really sure what I have been doing, seeing as it was months ago. I don't really remember!

But uh, this problem is keeping me from doing anything in the terminal that has to do with sudo, apt, or anything at al, and the problem always comes up like this,

E: Syntax error /etc/apt/apt.conf.d/99ignoreresave:2: Extra junk at end of file
E: Syntax error /etc/apt/apt.conf.d/99mysettings:3: Extra junk at end of file

I really want to do stuff again so can someone please help fix this for me I've tried rewriting the file with nano, doesn't fix it. I've done what the internet says to do but nothing ever works.

1
  • 1
    Since you seem to know how to read the file, edit the question to show us the extra junk at the end of that file. Use copy-and-paste to copy the contents.
    – user535733
    Jun 20, 2020 at 3:01

1 Answer 1

1

Looks like you've created a bunch of extra files (with errors) in apt.conf.d. You should get rid of these files.

Enter Recovery Mode

  1. Reboot your computer and quickly press and hold the Shift key to enter the Grub menu.

  2. Select "(recovery mode)".

  3. In the next menu, select "Drop to root shell prompt".

  4. In the terminal, mount your file system as read/write:

     mount -o remount,rw /
     mount --all
    

Make a temporary directory:

mkdir /home/Temp

Move the erroneous files:

mv /etc/apt/apt.conf.d/99ignoreresave /home/Temp
mv /etc/apt/apt.conf.d/99mysettings /home/Temp

If there are other files you manually created, move them also.

Then, reboot.

(If you don't need your custom files, you can remove them all using sudo rm -rf /home/Temp, or you can move them somewhere else to review them).

3
  • i havent tried this yet, im currently downloading a 400 mb download of a iso, but ill try it out in like an half an hour and ill recomment if it works. thank you Jun 20, 2020 at 22:06
  • i think it worked, man thank you so much. you dont know how much this has helped me Jun 20, 2020 at 22:34
  • Glad it worked! You can click the check mark to accept the answer, so others with this issue can know that this solution works.
    – Enterprise
    Jun 20, 2020 at 22:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .