How do I uninstall a package?

Asked by Bruce MacAlister

I intended this question for the gnuradio website. It seems very restrictive. I cannot find a way in. Google searches provide answers that do not seem to work.

How do I remove (uninstall) gnuradio? I installed it with a BASH from gnuradio.org/redmine/projects/gnuradio/wiki/InstallingGR#Using-the-build-gnuradio-script. (I can send the script if that would help.) I've searched but cannot find a similarly complete uninstall BASH. I have seen notes about going to each directory and running a script but I have no idea what got installed where nor which script to use. I'm using Ubuntu 12.04 LTS up to date as of the 18 July 2014 updates.

I see gnuradio in Synaptic as installed. Theoretically I can install from there but the last time I tried to use Synaptic to remove (for a Brother printer driver) it got partly removed resulting in a mess that finally got cleaned up by my contacting Brother who sent me an uninstall BASH.

Perhaps your answering this will also be a good tutorial on uninstalling any package.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Bruce MacAlister
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

apt-cache policy gnuradio; lsb_release -a

Thanks

Revision history for this message
Daniel Letzeisen (dtl131) said :
#2

The script does not build packages, so you have to run 'sudo make uninstall' from the gnuradio directory, and probably from uhd and rtl-sdr dirs if you have them (it looks like the script puts those directories in the same directory where it resides).
http://www.sbrac.org/files/build-gnuradio

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#3

@Bruce: there are several ways to install and uninstall software in Ubuntu.

There are preferred ways and least preferred ways of installing software.

You chose the least preferable way to install software in Ubuntu.

Here is my list of install methods where 1) is most recommended and 4) is least recommended.
Installing from source should be your LAST resort option, not your first option.

1) install package via package manager using standard Ubuntu repository (apt-get, aptitude, synaptic, Ubuntu software center)
2) install package via package manager using PPA Ubuntu repository (via apt-get, aptitude, synaptic, Ubuntu software center)
3) install binary .deb package using dpkg command (downloading from a random website is not as safe as downloading from repository!)
4) install from source code (using ./configure, make, make install)

You could have chosen option 2 instead of option 4 to install gnuradio, which would have made the uninstall process a lot easier....

Here is an example of a PPA for installing gnuradio in Ubuntu 12.04 LTS:

https://launchpad.net/~gqrx/+archive/ubuntu/releases?field.series_filter=precise

I also recommend reading these guides:

https://help.ubuntu.com/community/ExternalGuides

If you decide to install Ubuntu 14.04 LTS, it is even easier to install gnuradio, because you can then choose option 1) (install from default Ubuntu repository).

Ubuntu 14.04 LTS is supported until April 2019.

Revision history for this message
Bruce MacAlister (w4bru) said :
#4

Thanks, actionparsnip. Here's the answer to your query:

apt-cache policy gnuradio; lsb_release -a
gnuradio:
  Installed: 3.7.2.1-77
  Candidate: 3.7.2.1-77
  Version table:
 *** 3.7.2.1-77 0
        500 http://files.ettus.com/binaries/uhd_stable/repo/gnuradio/ubuntu/precise/ precise/main i386 Packages
        100 /var/lib/dpkg/status
LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 12.04.4 LTS
Release: 12.04

Mark, I appreciate your install and uninstall advise. On my second Ubuntu machine I've been pretty rigorous about using 1) and 2). On this, my first Ubuntu machine, I didn't know better so it's kind of a mess. Eventually I need to clean it up, probably wiping it and installing the newest LTS. I installed gnuradio the only way I could find on-liine, option 3). That's what I want to remove (in bad English "uninstall".) I'm into radios and not wrangling code. gnradio looks like a beast, mostly code wrangling and not much radio. I'll look for another Linux option for the DVB-T dongle. If Linux can't hack it, I'll try Wine with the Windows code that seems to work well and with little drama. I'm trying to stay with Ubuntu for my radio computers but it isn't easy.

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

There is a version of gnuradio installed with help of the package management tools, and I recommend you de-install it with the same tools, e.g. with synaptic or software-center, or with the terminal command "sudo dpkg --purge gnuradio".

When you have done that, you can check for any leftovers (also from manual installation via command line scripts) with the commands

sudo updatedb
locate gnuradio

Revision history for this message
Bruce MacAlister (w4bru) said :
#6

Thank you all who helped me with this. This is my first successful use of Synaptic to remove some software. Following your lead, Manfred, I used locate. I found and was able to delete most of the leftover files. Some of those did not allow a file delete so I've got 30megs or so of junk but the harddrive is 300megs lighter. I'll figure out the rest later.

This solves my major problem. If anyone cares to comment, is there a Linux or Ubuntu equivalent to CClean that will clear out unused files? I know Linux doesn't have a registry but I need something that will report on apparently ophaned files and code and let me remove it.

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#7

@Bruce: you should normally create a separate thread for new questions.

I will give you my advice this time, but please create a separate thread next time.

$ apt-cache show bleachbit
Package: bleachbit
Priority: optional
Section: universe/admin
Installed-Size: 1904
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Luca Falavigna <email address hidden>
Architecture: all
Version: 1.0-1
Depends: python:any (>= 2.7.1-0ubuntu2), python (>= 2.6) | python-simplejson, python-gtk2 (>= 2.14), menu
Recommends: python-notify
Filename: pool/universe/b/bleachbit/bleachbit_1.0-1_all.deb
Size: 250632
MD5sum: 7dd2ed62db4f54f5451f8f49266ca5fc
SHA1: 407df8a88874d332dbbf5b014c85a5d29eb242ce
SHA256: 1a3bba54f226dc07f679e3e8568771faebbbb36073ad44ee6a69244270832ca3
Description-en: delete unnecessary files from the system
 BleachBit deletes unnecessary files to free valuable disk space, maintain
 privacy, and remove junk. It removes cache, Internet history, temporary files,
 cookies, and broken shortcuts.
 .
 It handles cleaning of Adobe Reader, Bash, Beagle, Epiphany, Firefox, Flash,
 GIMP, Google Earth, Java, KDE, OpenOffice.org, Opera, RealPlayer, rpmbuild,
 Second Life Viewer, VIM, XChat, and more.
 .
 Beyond simply erasing junk files, BleachBit wipes free disk space (to hide
 previously deleted files for privacy and to improve compression of images),
 vacuums Firefox databases (to improve performance without deleting data), and
 securely shreds arbitrary files.
Description-md5: a958efd51e414316ebd3cb47958129ea
Homepage: http://bleachbit.sourceforge.net
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

Revision history for this message
Bruce MacAlister (w4bru) said :
#8

Thanks Mark. I'll behave next time.

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

Another comment:

You wrote that you are unable to delete some leftover files identified with "locate gnuradio". Most probably they are located in a directory with restricted access (i.e. in a system directory). You might be able to delete them by using sudo in front of the "rm" command. E.g. "sudo rm /directory/subdir/filename". "sudo" will temporarily grant administrative rights to you and lift access restrictions. Use extreme caution with "sudo rm ..." and similar commands, as typo errors might completely break your system.

As another proposal for a cleanup application: Ubuntu-tweak also contains a "janitor" functionality, besides some other nice features. To install use the command

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

Revision history for this message
Bruce MacAlister (w4bru) said :
#10

Manfred and Mark,

Ubuntu-Tweak worked well. It seems to be similar to CClean in Windows. It intelligently goes after leftovers with a process similar to CClean registry cleanup. Bleachbit is very powerful. I cleaned out some junk from my Firefox collection. I need to understand it better since it looks like I can do some real damage with it.

Should I post this issue of cleaning up as a separate question to which you can post your answers? I've not found such a comprehensive set of answers in the FAQs and the wikis.

Bruce MacAlister