How to Remove all Android -Tools (ADB and fastboot) plus SDK from Ubuntu 12.04 (64-bit)
So, I installed Android SDK to root my android phone, using script obtained thus:
wget http://
chmod +x android_
sudo ./android_
(on my system: sudo /home/xxx/
Next, I also installed "android-tools" package (adb and fastboot) in 64-bit Ubuntu 12.04 from WebUd8 ( http://
sudo add-apt-repository ppa:nilarimogar
sudo apt-get install android-tools-adb android-
Then I used:
sudo apt-get install android-
to backport the Ubuntu Raring builds to Ubuntu 12.04
Just discovered the packages (android-tools, adb and sdk) take too much valuable space and would like to remove them, together with all associated packages.
Need comprehensive guide.
cheers.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Manfred Hampl
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Hi,
you can remove Ubuntu-SDK without re-installing Ubuntu. Once it is removed, you can also remove all library files associated with it.
Run following commands in series:
$ sudo apt-get autoremove android-sdk android-tools-adb android-
$ sudo apt-get --purge remove android-sdk
$ sudo apt-get autoclean
$ sudo apt-get autoremove
Above commands will remove android-SDK from your system. If you get any error after any command, just edit your question and paste the result.
Revision history for this message
|
#2 |
So, I gave:
sudo apt-get autoremove android-sdk android-tools-adb android-
Output was:
$: "Package android-sdk not found"
I do not know what's in the script android_
Cheers
Revision history for this message
|
#3 |
Correction:
E: Package android-sdk not found
Revision history for this message
|
#4 |
So, here is the text file of the shell script android_
#!/bin/bash
#
# This script is designed to install the Android SDK, NDK, and Eclipse in
# Linux Mint 11 and make it easier for people that want to develop for
# Android using Linux.
# Script written by @ArchDukeDoug with special thanks to @BoneyNicole,
# @tabbwabb, and @animedbz16 for putting up with me and proofreading and/or
# testing the script.
# I can be reached at <email address hidden>, twitter, or linuxrandomly.
# Script version: 1.0.5
# Changelog: 1.0.5 - Fixed the Android SDK search parameters to fit the new
# naming scheme on http://
# Edit by christoph Langner http://
# Removed installation von Android NDK and Eclipse
i=$(cat /proc/$
if [[ $UID != 0 ]]; then
echo "Please type sudo $0 $*to use this."
exit 1
fi
apt-get update
#Download and install the Android SDK
if [ ! -d "/usr/local/
for a in $( wget -qO- http://
wget $a && tar --wildcards --no-anchored -xvzf android-
done
else
echo "Android SDK already installed to /usr/local/
fi
d=ia32-libs
#Determine if there is a 32 or 64-bit operating system installed and then install ia32-libs if necessary.
if [[ `getconf LONG_BIT` = "64" ]];
then
echo "64-bit operating system detected. Checking to see if $d is installed."
if [[ $(dpkg-query -f'${Status}' --show $d 2>/dev/null) = *\ installed ]]; then
echo "$d already installed."
else
echo "Installing now..."
apt-get --force-yes -y install $d
fi
else
echo "32-bit operating system detected. Skipping."
fi
#Check if the ADB environment is set up.
if grep -q /usr/local/
then
echo "ADB environment already set up"
else
echo "export PATH=$PATH:
fi
#Check if the ddms symlink is set up.
if [ -f /bin/ddms ]
then
rm /bin/ddms; ln -s /usr/local/
else
ln -s /usr/local/
fi
#Create etc/udev/
touch -f 99-android.rules
echo "#Acer" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#ASUS" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Dell" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Foxconn" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Garmin-Asus" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Google" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#HTC" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Huawei" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#K-Touch" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#KT Tech" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Kyocera" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Lenevo" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#LG" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Motorola" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#NEC" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Nook" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Nvidia" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#OTGV" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Pantech" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Philips" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#PMC-Sierra" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Qualcomm" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#SK Telesys" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Samsung" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Sharp" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Sony Ericsson" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#Toshiba" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
echo "#ZTE" >> 99-android.rules
echo "SUBSYSTEM=="usb", SYSFS{idVendor}
mv -f 99-android.rules /etc/udev/rules.d/
chmod a+r /etc/udev/
#Check if ADB is already installed
if [ ! -f "/usr/local/
then
nohup /usr/local/
zenity --info --text="Please accept the licensing agreement for Android SDK Platform-tools to install the Android Debug Bridge."
else
echo "Android Debug Bridge already detected."
fi
exit 0
Need help removing all packages associated with this script that are not needed by other packages.
Cheers.
Revision history for this message
|
#5 |
What is the output of:
lsb_release -a; uname -a; df -h
Thanks
Revision history for this message
|
#6 |
LSB Version: core-2.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
Linux Guest-ThinkCent
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/dev/sda5 11G 11G 408M 97% /
udev 1.9G 4.0K 1.9G 1% /dev
tmpfs 381M 904K 380M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.9G 74M 1.8G 4% /run/shm
/dev/sda7 184G 37G 138G 22% /home
/dev/sdb1 932G 105G 828G 12% /media/HITACHI
Revision history for this message
|
#7 |
What is the output of:
dpkg -l | grep -i android
Thanks
Revision history for this message
|
#8 |
Output of dpkg -l | grep -i android:
ii android-tools-adb 4.2.2+git201302
ii android-
ii android-
ii ibus-pinyin-
Thanks
Revision history for this message
|
#9 |
What is the output of the command
du -sh /usr/local/
Revision history for this message
|
#11 |
Ok.
To remove the android packages: the commands
sudo dpkg --purge android-tools-adb android-
sudo apt-get --purge autoremove
should uninstall the packages (are of minor size).
The main space usage is in the /usr/local/
If you are sure that there are no files that you need, you can delete everything with the command
sudo rm -rf /usr/local/
Finally execute the commands
sudo updatedb
locate android-sdk
the check whether there are any additional files left (e.g maybe the tarball in your Download directory with 140 MB size)
Revision history for this message
|
#12 |
I first I tried:
sudo dpkg --purge android-tools-adb android-
(Lese Datenbank ... 232595 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von android-tools-adb ...
Entfernen von android-
Entfernen von android-
dpkg: Abhängigkeitspr
ibus-pinyin hängt ab von ibus-pinyin-
Paket ibus-pinyin-
Paket ibus-pinyin-
dpkg: Fehler beim Bearbeiten von ibus-pinyin-
Abhängigkeitsp
Trigger für man-db werden verarbeitet ...
Fehler traten auf beim Bearbeiten von:
ibus-pinyin-
xxx@Guest-
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Statusinformationen werden eingelesen... Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 2 nicht aktualisiert.
Then
xxx@Guest-
xxx@Guest-
xxx@Guest-
xxx@Guest-
Can't see any additional files in Download folder. Must i assume job is done?
Revision history for this message
|
#13 |
@m-hampl What of the unresolved dependencies?
Thanks
Revision history for this message
|
#14 |
Ok, on of the program packages was not removed (due to dependencies), but that should not matter.
What is now the output of
sudo apt-get update
sudo apt-get dist-upgrade
df -h
df -i
Revision history for this message
|
#15 |
Update returned no errors. The rest are as follows:
xxx@Guest-
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Statusinformationen werden eingelesen... Fertig
Paketaktualisierung (Upgrade) wird berechnet... Fertig
Die folgenden Pakete sind zurückgehalten worden:
lxpanel pcmanfm
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 2 nicht aktualisiert.
xxx@Guest-
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/dev/sda5 11G 7.4G 3.2G 71% /
udev 1.9G 4.0K 1.9G 1% /dev
tmpfs 381M 908K 380M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.9G 57M 1.9G 3% /run/shm
/dev/sda7 184G 31G 144G 18% /home
/dev/sdb1 932G 105G 828G 12% /media/HITACHI
xxx@Guest-
Dateisystem Inodes IBenutzt IFrei IUse% Eingehängt auf
/dev/sda5 732960 281378 451582 39% /
udev 484834 550 484284 1% /dev
tmpfs 487038 511 486527 1% /run
none 487038 3 487035 1% /run/lock
none 487038 97 486941 1% /run/shm
/dev/sda7 12214272 49971 12164301 1% /home
/dev/sdb1 867318732 46664 867272068 1% /media/HITACHI
Revision history for this message
|
#16 |
As you can see there is 3.2 GB space free again on your root file system. I hope that is enough for you. IF not, you have to dig into the system to identify some more files that you can delete.
The only unexpected thing that I see, is that lxpanel and pcmanfm are not automatically updated.
What is the output of the terminal command
apt-cache policy lxpanel pcmanfm
Revision history for this message
|
#17 |
Gave
apt-cache policy lxpanel pcmanfm
output:
xxx@Guest-
lxpanel:
Installiert: 0.5.8+git201202
Kandidat: 0.7.2.0.
Versionstabelle:
0.
500 http://
*** 0.5.8+git201202
500 http://
100 /var/lib/
pcmanfm:
Installiert: 0.9.10-0ubuntu2
Kandidat: 1.2.3+bzr1405+
Versionstabelle:
1.
500 http://
*** 0.9.10-0ubuntu2 0
500 http://
100 /var/lib/
Revision history for this message
|
#18 |
I see that you have the official version installed, and there is an updated version available from a PPA.
If you want to update to the PPA version, you could try the command
sudo apt-get install lxpanel pcmanfm
I am not sure if that really works, there might be dependency problems with the PPA packages.
Revision history for this message
|
#19 |
Thanks Manfred Hampl, that solved my question.