Проблема с перегревом с dell n5110 Ubuntu 13.04

Вы можете использовать журнал истории событий:

gedit /var/log/apt/history.log

и найти в журнале запись, когда вы впервые установили метапакет вашего рабочего стола env (Gnome-shell, Cinnamon, KDE ...) , Вы найдете такую ​​запись, как: apt-get install yourdesktopenv, за которой следуют все зависимости пакетов и их информация о свопе.

Скопируйте всю запись и запишите ее в LibreOffice Writer, затем используйте Search / Replace, используя регулярное выражение: [ f4] Заменить пустым пространством. (amd64 или i368 в зависимости от вашей системной арки) Эта операция замены заменит все somedependency: amd64 (4.9.2-0ubuntu2, automatic), на somepackage. В конце добавьте sudo apt-get remove --auto-remove в начало замененного текста. Скопируйте и вставьте в Terminal.

пустое пространство. : этот метод правильный, только если вы не выполнили значимые обновления между временем, когда вы впервые установили рабочий стол env и время, которое вы хотите чтобы удалить его.

В идеале вы можете автоматизировать эти операции в сценарии bash:

 #!/bin/bash

#This creepy & very small script extracts package strings from APT history log file.
#Tested in Ubuntu 12.10 Linux
#this script is not fully portable; ksh & zsh not supported.
#---------------------------------------------------------------------------------------
#@author= hanynowsky@gmail.com
#---------------------------------------------------------------------------------------
#Beware. This scripts supposes you installed the desktop environment only once. Besides if 
#you performed significant updates from the time when you installed it and the time when
# you want to remove it, there is a risk that you'd likely remove other dependency packages needed by other programs. 
#---------------------------------------------------------------------------------------
#REGEXMATCH=`grep -Po ':amd64 \([0-9\~\.\+a-zA-Z\-, ]*\),?'`
#APPENDCOM=`sed -i '1isudo apt-get remove --auto-remove ' ~/Desktop/removeENV.txt`
# or sed 's/\[[^]]*\]//g'    instead of perl -lpwe   | tee ~/Desktop/removeENV.txt`
# insert command: sed '/Install:/ i\sudo apt-get remove --auto-remove '
# ARCH=`dpkg --print-architecture`   ->  variable to get arch (amd64 or i386)
#---------------------------------------------------------------------------------------

# k = kde | g = gnome-shell | c = cinnamon | x = xcfe | l = lmde | o = openbox
echo "Uninstall Desktop-Environment : "
read -p "Enter letter ( k ) for KUBUNTU - ( g ) for GNOME-SHELL - ( x ) for XUBUNTU - ( l ) for LUBUNTU - ( o ) for openbox : " desk
if [ "$desk" = "k" ]; then DESKSTRING="kubuntu-desktop"
elif [ "$desk" = "g" ]; then DESKSTRING="gnome-shell";
elif [ "$desk" = "x" ]; then DESKSTRING="xubuntu-desktop";
elif [ "$desk" = "l" ]; then DESKSTRING="lubuntu-desktop";
elif [ "$desk" = "o" ]; then DESKSTRING="openbox";
else DESKSTRING="UNKNOWN-DESKTOP-ENV"; echo "Sorry $USER, operation is not valid for $DESKSTRING" ; echo "Aborted."; exit 0;
fi

ARCH=`dpkg --print-architecture`
APTLOGFILE="/var/log/apt/history.log"
WARNING="This will uninstall your desktop environment : $DESKSTRING . Enter 'y' to continue, or 'n' to abort. "
read -p "$WARNING" option
if [ "$option" = "y" ]; then FETCHCOM=`sed -n "/$DESKSTRING/{:a;n;/End-Date/q;p;ba}" $APTLOGFILE | 
sed -e 's/Install://g'  | 
sed -e 's/,//g' | 
perl -lpwe "s/:$ARCH \(.*?\)//g" | tee ~/Desktop/un_desk_log.txt`
else FETCHCOM="aborted by $USER"
fi
if [ "$option" = "y" ]; then ACTIONCOM="sudo apt-get remove --auto-remove "
else ACTIONCOM=""
fi
FINALCOM=$ACTIONCOM$FETCHCOM
COMLOGFILE=~/Desktop/un_desk_log.txt
eval $FINALCOM | tee -a $COMLOGFILE
sed -i.bak '1i sudo apt-get remove --auto-remove ' $COMLOGFILE
exit 0;

Загрузите скрипт здесь: http://ubuntuone.com/4CPFXpA2gFDRZtfS6Y7sva

1
задан 25 March 2016 в 02:05

0 ответов

Другие вопросы по тегам:

Похожие вопросы: