如何删除之前运行的错误命令?

如何删除之前运行的错误命令?

我从 Noobslabs.com 运行命令

deb-src http://ppa.launchpad.net/noobslab/themes/ubuntu precise main

但输入错误

deb-src http://ppa.launchpad.net/noobslab/themes/ubuntu precise main ain

现在,这个错误的命令阻止其他应用程序正常工作,并且我使用的任何应用程序在一段时间后都会崩溃。

显示的问题为:

An unresolvable problem occurred while initializing the package information.

Please report this bug against the 'update-manager' package and 
include the following error message:
    'E:Type 'ain' is not known on line 3 in source list
    /etc/apt/sources.list.d/noobslab-themes-precise.list']"

我该如何解决?

答案1

这应该可以修复它:

sudo sed -i 's/ ain//' /etc/apt/sources.list.d/noobslab-themes-precise.list

否则,请手动运行sudoedit /etc/apt/sources.list.d/noobslab-themes-precise.list并修复该线路。

相关内容