如何删除 Lubuntu 桌面环境并恢复默认设置?

如何删除 Lubuntu 桌面环境并恢复默认设置?

我在使用 Ubuntu 时遇到了问题。它总是以低图形设置启动,并且运行缓慢。

  1. 我安装了 Lubuntu 桌面环境,然后我意识到我不喜欢它,所以我尝试删除它。我可能将 SeatDefaults 设置为空白或:

    user-session=ubuntu
    
    greeter-session=unity-greeter
    
  2. 我如何将其恢复为 Ubuntu?我不记得我所做的所有更改,也不确定如何修复它们。我不想丢失我的应用程序或文档。

编辑:运行Nathan Smith建议的代码后我得到了这些输出

sudo apt-get purge --auto-remove abiword abiword-commonabiword-plugin-grammar abiword-plugin-mathview  ace-of-penguins audacious audacious-plugins audacious-plugins-data blueman  chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg  elementary-icon-theme esound-common galculator gdebi gdebi-core  gecko-mediaplayer giblib1 gnome-icon-theme-full gnome-mplayer gnome-system-tools  gnome-time-admin gnumeric gnumeric-common gnumeric-doc gpicview  gtk2-engines-pixbuf guvcview hardinfo indicator-status-provider-pidgin leafpad  libaacs0 libabiword-2.9 libaudclient2 libaudcore1 libaudiofile1 libbinio1ldbl  libbluray1 libbs2b0 libcddb2 libcompfaceg1 libcue1 libencode-locale-perl  libept1.4.12 libesd0 libexo-1-0 libexo-common libexo-helpers  libfile-listing-perl libfluidsynth1 libfm-data libfm-gtk-data libfm-gtk1 libfm1  libfont-afm-perl libgdome2-0 libgdome2-cpp-smart0c2a libglade2-0 libgmlib0  libgmtk0 libgmtk0-data libgoffice-0.8-8 libgoffice-0.8-8-common libgringotts2  libgsf-1-114 libgsf-1-common libgtkmathview0c2a libguess1 libhtml-form-perl  libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl  libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl  libhttp-negotiate-perl libid3tag0 libimlib2 libio-socket-inet6-perl  libio-socket-ssl-perl libjpeg-progs libjpeg-turbo-progs liblink-grammar4  libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl  libmailtools-perl libmcrypt4 libmenu-cache1 libmowgli2 libmpg123-0  libnet-dbus-perl libnet-http-perl libnet-ssleay-perl libobrender27 libobt0  libonig2 liboobs-1-5 libopts25 libots0 libpisock9 libresid-builder0c2a  libsidplay2 libsocket6-perl libtar0 libtidy-0.99-0 libtie-ixhash-perl  libtimedate-perl libuniconf4.6 liburi-perl libvdpau1 libwebcam0 libwv-1.2-4  libwvstreams4.6-base libwvstreams4.6-extras libwww-perl libwww-robotrules-perl  libxfce4ui-1-0 libxfce4util-bin libxfce4util-common libxfce4util4 libxfconf-0-2  libxml-parser-perl libxml-twig-perl libxml-xpath-perl libxss1  lightdm-gtk-greeter link-grammar-dictionaries-en lm-sensors lubuntu-artwork  lubuntu-artwork-12-04 lubuntu-core lubuntu-default-settings lubuntu-desktop  lubuntu-icon-theme lubuntu-software-center lxappearance lxappearance-obconf  lxinput lxkeymap lxlauncher lxmenu-data lxpanel lxpanel-indicator-applet-plugin  lxrandr lxsession lxsession-edit lxshortcut lxtask lxterminal mplayer2 mtpaint  ntp obconf openbox openbox-themes osmo pcmanfm pidgin pidgin-data  pidgin-libnotify pidgin-microblog plymouth-theme-lubuntu-logo  plymouth-theme-lubuntu-text python-pysqlite2 python-xklavier scrot sylpheed  sylpheed-doc sylpheed-i18n sylpheed-plugins synaptic system-tools-backends  transmission ttf-lyx uvcdynctrl uvcdynctrl-data wvdial xfburn  xfce-keyboard-shortcuts xfce4-power-manager xfce4-power-manager-data xfconf  xfonts-100dpi xpad xscreensaver xscreensaver-dat
 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 Package 'indicator-status-provider-pidgin' is not installed, so not                       removed
 Package 'libfm1' is not installed, so not removed
 Package 'libmenu-cache1' is not installed, so not removed
 Package 'libxfce4util4' is not installed, so not removed
 E: Unable to locate package abiword-commonabiword-plugin-grammar
 E: Unable to locate package libabiword-2.9
 E: Couldn't find any package by regex 'libabiword-2.9'
 E: Unable to locate package libfm-gtk1
 E: Unable to locate package libgmlib0
 E: Unable to locate package libgmtk0
 E: Unable to locate package libgmtk0-data
 E: Unable to locate package libobrender27
 E: Unable to locate package libobt0
 E: Unable to locate package openbox-themes

编辑_2/更新:

运行Nathan Smith建议的代码后:

sudo apt-get purge --auto-remove abiword abiword-plugin-mathview ace-of-penguins audacious audacious-plugins audacious-plugins-data blueman chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg elementary-icon-theme esound-common galculator gdebi gdebi-core gecko-mediaplayer giblib1 gnome-icon-theme-full gnome-mplayer gnome-system-tools gnome-time-admin gnumeric gnumeric-common gnumeric-doc gpicview gtk2-engines-pixbuf guvcview hardinfo leafpad libaacs0 libaudclient2 libaudcore1 libaudiofile1 libbinio1ldbl libbluray1 libbs2b0 libcddb2 libcompfaceg1 libcue1 libencode-locale-perl libept1.4.12 libesd0 libexo-1-0 libexo-common libexo-helpers libfile-listing-perl libfluidsynth1 libfm-data libfm-gtk-data libfont-afm-perl libgdome2-0 libgdome2-cpp-smart0c2a libglade2-0 libgoffice-0.8-8 libgoffice-0.8-8-common libgringotts2 libgsf-1-114 libgsf-1-common libgtkmathview0c2a libguess1 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libid3tag0 libimlib2 libio-socket-inet6-perl libio-socket-ssl-perl libjpeg-progs libjpeg-turbo-progs liblink-grammar4 libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libmcrypt4 libmowgli2 libmpg123-0 libnet-dbus-perl libnet-http-perl libnet-ssleay-perl libonig2 liboobs-1-5 libopts25 libots0 libpisock9 libresid-builder0c2a libsidplay2 libsocket6-perl libtar0 libtidy-0.99-0 libtie-ixhash-perl libtimedate-perl libuniconf4.6 liburi-perl libvdpau1 libwebcam0 libwv-1.2-4 libwvstreams4.6-base libwvstreams4.6-extras libwww-perl libwww-robotrules-perl libxfce4ui-1-0 libxfce4util-bin libxfce4util-common libxfconf-0-2 libxml-parser-perl libxml-twig-perl libxml-xpath-perl libxss1 lightdm-gtk-greeter link-grammar-dictionaries-en lm-sensors lubuntu-artwork lubuntu-artwork-12-04 lubuntu-core lubuntu-default-settings lubuntu-desktop lubuntu-icon-theme lubuntu-software-center lxappearance lxappearance-obconf lxinput lxkeymap lxlauncher lxmenu-data lxpanel lxpanel-indicator-applet-plugin lxrandr lxsession lxsession-edit lxshortcut lxtask lxterminal mplayer2 mtpaint ntp obconf openbox osmo pcmanfm pidgin pidgin-data pidgin-libnotify pidgin-microblog plymouth-theme-lubuntu-logo plymouth-theme-lubuntu-text python-pysqlite2 python-xklavier scrot sylpheed sylpheed-doc sylpheed-i18n sylpheed-plugins synaptic system-tools-backends transmission ttf-lyx uvcdynctrl uvcdynctrl-data wvdial xfburn xfce-keyboard-shortcuts xfce4-power-manager xfce4-power-manager-data xfconf xfonts-100dpi xpad xscreensaver xscreensaver-data

它处理起来没有任何问题,但是当我重新启动时,我被卡在 Ubuntu 的启动屏幕上。

我的下一个问题是,我是否可以将整个系统恢复为默认设置,同时丢失所有内容,但我将从头开始,而不需要 USB、CD、DVD 或其他可启动媒体来启动系统?

先感谢您。

答案1

我认为你可以按照问题答案中概述的步骤进行操作如何删除除 Unity 之外的所有桌面环境,跳过他们正在删除的除 lubuntu-desktop 之外的其他桌面环境。(他们还安装了 xubuntu、cinnamon 和 gnome)

编辑:现在就试试吧。我快速编写了一个 Python 脚本来删除原始命令中错误中出现的软件包。它给了我:

sudo apt-get purge --auto-remove abiword abiword-plugin-mathview ace-of-penguins audacious audacious-plugins audacious-plugins-data blueman chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg elementary-icon-theme esound-common galculator gdebi gdebi-core gecko-mediaplayer giblib1 gnome-icon-theme-full gnome-mplayer gnome-system-tools gnome-time-admin gnumeric gnumeric-common gnumeric-doc gpicview gtk2-engines-pixbuf guvcview hardinfo leafpad libaacs0 libaudclient2 libaudcore1 libaudiofile1 libbinio1ldbl libbluray1 libbs2b0 libcddb2 libcompfaceg1 libcue1 libencode-locale-perl libept1.4.12 libesd0 libexo-1-0 libexo-common libexo-helpers libfile-listing-perl libfluidsynth1 libfm-data libfm-gtk-data libfont-afm-perl libgdome2-0 libgdome2-cpp-smart0c2a libglade2-0 libgoffice-0.8-8 libgoffice-0.8-8-common libgringotts2 libgsf-1-114 libgsf-1-common libgtkmathview0c2a libguess1 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libid3tag0 libimlib2 libio-socket-inet6-perl libio-socket-ssl-perl libjpeg-progs libjpeg-turbo-progs liblink-grammar4 libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libmcrypt4 libmowgli2 libmpg123-0 libnet-dbus-perl libnet-http-perl libnet-ssleay-perl libonig2 liboobs-1-5 libopts25 libots0 libpisock9 libresid-builder0c2a libsidplay2 libsocket6-perl libtar0 libtidy-0.99-0 libtie-ixhash-perl libtimedate-perl libuniconf4.6 liburi-perl libvdpau1 libwebcam0 libwv-1.2-4 libwvstreams4.6-base libwvstreams4.6-extras libwww-perl libwww-robotrules-perl libxfce4ui-1-0 libxfce4util-bin libxfce4util-common libxfconf-0-2 libxml-parser-perl libxml-twig-perl libxml-xpath-perl libxss1 lightdm-gtk-greeter link-grammar-dictionaries-en lm-sensors lubuntu-artwork lubuntu-artwork-12-04 lubuntu-core lubuntu-default-settings lubuntu-desktop lubuntu-icon-theme lubuntu-software-center lxappearance lxappearance-obconf lxinput lxkeymap lxlauncher lxmenu-data lxpanel lxpanel-indicator-applet-plugin lxrandr lxsession lxsession-edit lxshortcut lxtask lxterminal mplayer2 mtpaint ntp obconf openbox osmo pcmanfm pidgin pidgin-data pidgin-libnotify pidgin-microblog plymouth-theme-lubuntu-logo plymouth-theme-lubuntu-text python-pysqlite2 python-xklavier scrot sylpheed sylpheed-doc sylpheed-i18n sylpheed-plugins synaptic system-tools-backends transmission ttf-lyx uvcdynctrl uvcdynctrl-data wvdial xfburn xfce-keyboard-shortcuts xfce4-power-manager xfce4-power-manager-data xfconf xfonts-100dpi xpad xscreensaver xscreensaver-data

如果这不起作用,你只需使用

sudo apt-get purge --auto-remove lubuntu-desktop

正如那里提到的,执行该命令后,您还应该自动清理以丢弃不需要的旧包数据,并使用智能依赖处理进行更新和 dist-upgrade,如下所示:

sudo apt-get autoclean

sudo apt-get update 

sudo apt-get dist-upgrade

更新 #2:尝试重新启动计算机,然后按 Ctrl+Alt+F1 而不是正常登录。这应该会让您进入文本模式 tty1 shell(Ctrl+Alt+F7 将让您返回 GUI - 一旦 GUI 修复!)。输入您的用户名和密码进行登录。

如果你很幸运,你会有互联网(要找到答案,请输入“ping askubuntu.com”等待几秒钟,如果你收到除错误/超时之外的响应,则它有效并且你可以使用 ctrl+c 停止它)否则你可以进行搜索并找到如何从命令行连接到网络的指南。

现在你可以尝试以下方法

sudo apt-get --fix-broken install unity unity-greeter

然后重启。另外,检查一下 LightDM 的显示管理器文档& Ubuntu 专用文档在这里。您可能需要重新安装/重新配置它才能正常工作

如果这不起作用,或者这似乎比获取可启动媒体更难,那么最好的选择可能是尝试 Xubuntu 或您认为效果最好的其他 Ubuntu 版本。从实时会话中,您应该能够移动重要文件,然后进行安装。有时也可以创建省钱的安装(例如主磁盘上的实时会话),而无需可启动媒体,但它们可能很棘手,因为您必须使用大量命令行实用程序和/或运行虚拟机。

祝你好运!

相关内容