LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2018, 10:07 AM   #1
TheGeniusLOL
LQ Newbie
 
Registered: Oct 2018
Posts: 22

Rep: Reputation: Disabled
How do I uninstall a tarball with directories? With no uninstall script


hey

I downloaded this tarball from spideroak's website named SpiderOakONE-7.3.0-slack_tar_x64.tgz.

I untar it and listed the files and it has only three directories inside
Code:
ls
etc/  opt/  usr/
I know how to install this, BUT NOT uninstall it. There is no script to uninstall it if I don't like it.

I don't want to search each file from the root filesystem and delete it one by one.

Any help or suggestions are welcome. Thanks all

Last edited by TheGeniusLOL; 10-31-2018 at 10:08 AM.
 
Old 10-31-2018, 10:27 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,050
Blog Entries: 13

Rep: Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498
EDIT: I just grabbed it and ran a tar tvf to see the files it would extract.

/usr/share/doc tree is a big hint

/usr/share/doc/SpiderOakONE/Getting Started Guide.pdf is probably the next big thing to look at here


I don't have any experience with that software package. They also do have release notes on their website. You probably should peruse those as well.

Hope this helps.

Older part of my reply:
Well you can get a further listing of the files by using the -R switch on the ls command.

Are there any hidden files? Have you performed ls -a to see if there is a .readme or other dot type of file that perhaps offers some more details?

What about the website where you downloaded this from? No instructions or anything?

I wouldn't do anything with it unless I fully understood exactly what I was supposed to do.

Is this for Slackware? If so, I can move it to that forum to get the perspectives from that team. Maybe my lack of familiarity with Slackware is an obvious detractor here.

Last edited by rtmistler; 10-31-2018 at 10:38 AM.
 
Old 10-31-2018, 11:00 AM   #3
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 3,119

Rep: Reputation: Disabled
Do you trust that website that you got it from, if not, why did you download it.

If you don't know what it does, don't extract it.
 
Old 10-31-2018, 11:13 AM   #4
TheGeniusLOL
LQ Newbie
 
Registered: Oct 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
EDIT: I just grabbed it and ran a tar tvf to see the files it would extract.

/usr/share/doc tree is a big hint

/usr/share/doc/SpiderOakONE/Getting Started Guide.pdf is probably the next big thing to look at here


I don't have any experience with that software package. They also do have release notes on their website. You probably should peruse those as well.

Hope this helps.

Older part of my reply:
Well you can get a further listing of the files by using the -R switch on the ls command.

Are there any hidden files? Have you performed ls -a to see if there is a .readme or other dot type of file that perhaps offers some more details?

What about the website where you downloaded this from? No instructions or anything?

I wouldn't do anything with it unless I fully understood exactly what I was supposed to do.

Is this for Slackware? If so, I can move it to that forum to get the perspectives from that team. Maybe my lack of familiarity with Slackware is an obvious detractor here.
I just visited the site again. The release notes are a list product releases.

Also, there are no instructions on the site on how to uninstall it. I guess they figure if we're using linux, we should know everything. LOL.

Anyway, deleting it won't be much of a chore since everything is contained in folders. I just have to carefully delete them.

PS: I'm not using slackware. That's all they had for a tarball.


Quote:
Originally Posted by fatmac View Post
Do you trust that website that you got it from, if not, why did you download it.

If you don't know what it does, don't extract it.
SpiderOak was once in the repos of pclinuxOS. It's not there anymore.

SpiderOak is a cloud backup tool

Last edited by TheGeniusLOL; 10-31-2018 at 11:16 AM.
 
Old 10-31-2018, 11:27 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,050
Blog Entries: 13

Rep: Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498Reputation: 3498
So wait, the Getting Started Guide.pdf file from that tar archive had nothing in it?

(Not that I don't agree with fatmac's statement as well as your intentions to delete it)
 
Old 10-31-2018, 07:53 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,435
Blog Entries: 25

Rep: Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439Reputation: 4439
If you still have the "make" directory, you can run "make uninstall" as root. I'm not sure it will remove everything, but it should be a good start.

Or you could recreate the "make directory" and run "make uninstall." I don't know whether you'd have to go through "configure" and "make" again.

Last edited by frankbell; 10-31-2018 at 07:54 PM.
 
Old 11-01-2018, 01:48 AM   #7
TheGeniusLOL
LQ Newbie
 
Registered: Oct 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
If you still have the "make" directory, you can run "make uninstall" as root. I'm not sure it will remove everything, but it should be a good start.

Or you could recreate the "make directory" and run "make uninstall." I don't know whether you'd have to go through "configure" and "make" again.
There is no make directory nor any source files. All files are already pre-compiled binaries.

After careful consideration, I decided not to install the program. I will use dropbox instead for backing up non-sensitive trivial files like some junk files and my shell scripts.
 
Old 11-01-2018, 06:12 AM   #8
addisonsophia
LQ Newbie
 
Registered: Oct 2018
Location: USA
Posts: 6

Rep: Reputation: Disabled
If you don't get any uninstall option then you should delete the file one by one....
 
Old 11-20-2018, 04:29 PM   #9
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,460

Rep: Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528
From the directory where you extracted SpiderOakONE-7.3.0-slack_tar_x64.tgz, make a log of the files within it, like so:

Code:
find etc opt usr ! -type d | sed 's:^:/:' > ~/SpiderOakONE-7.3.0-install.log
After reviewing that log file (~/SpiderOakONE-7.3.0-install.log) with ‘less’ to make sure it lists nothing odd and does not have clashes with existing files on your system, you can install the package via this method:

Code:
find etc opt usr ! -type d -print0 | sudo cpio --owner root: -p0mdv /
If you want to remove SpiderOakONE in the future, enter the following:

Code:
sudo xargs -d'\n' rm -v < ~/SpiderOakONE-7.3.0-install.log
All files (and symlinks) that were included could be removed in this way but not directories. They were intentionally omitted from the log, since they may have been shared with other software previously present on your system. For the most part, empty directories cause no problems and generally have negligible space requirements. So you could just ignore them.

But… if you are the type of person who feels ‘uncomfortable’ with a non-pristine system, the obvious non-shared directories for SpiderOakONE 7.3.0 are “/opt/SpiderOakONE” and its sub-directories, plus “/usr/share/doc/SpiderOakONE”. You could get rid of them with this command:

Code:
sudo find /opt/SpiderOakONE /usr/share/doc/SpiderOakONE -depth -type d -empty -exec rmdir -v {} \;

Last edited by ruario; 11-23-2018 at 05:51 AM. Reason: Simplified the cpio command; named the install log more appropriately; more about empty directories; safe rmdir
 
Old 11-20-2018, 04:47 PM   #10
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,460

Rep: Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528
If you want something a touch fancier or find yourself in similar situations in the future, I have a small shell script I wrote for tracking stuff I build from source, that works using these principles. It also works for repacking binaries: createpkg.

If you wanted to use it, you would need a “BUILD” file. This should do the job:

Code:
name=spideroakone
version=7.3.0
arch=x86_64
options=(!man !strip)
source=("http://APT.spideroak.com/ubuntu-spideroak-hardy/pool/restricted/s/$name/${name}_${version}_amd64.deb")

build() {
  find etc/xdg opt usr -print0 | cpio --quiet -p0d "$pkg"
}

P.S. You can use the following to work out the latest version in the future. Then, just update the version variable in the “BUILD” file (above).

Code:
wget -qO- http://APT.spideroak.com/ubuntu-spideroak-hardy/dists/release/restricted/binary-amd64/Packages.gz | zcat | grep -A1 -x 'Package: spideroakone' | sed -n 's/^Version: [0-9]\+:\(.*\)/\1/p' | sort -V

Last edited by ruario; 11-25-2018 at 10:38 AM. Reason: Simplified the BUILD example by using .deb as a source; added xdg menu file
 
Old 11-21-2018, 04:52 AM   #11
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,460

Rep: Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528
Quote:
Originally Posted by rtmistler View Post
EDIT: I just grabbed it and ran a tar tvf to see the files it would extract.

/usr/share/doc tree is a big hint

/usr/share/doc/SpiderOakONE/Getting Started Guide.pdf is probably the next big thing to look at here


I don't have any experience with that software package. They also do have release notes on their website. You probably should peruse those as well.

Hope this helps.
Sadly, that guide (which is very short and just a collection of a few links) and the release notes on their website are not remotely helpful with regards to how to install/remove this package when using the tar archive.
 
Old 11-27-2018, 07:45 AM   #12
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,460

Rep: Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528
FWIW, I wrote a script to make a better, generic Spider Oak ONE tarball package with clear install and uninstall directions. Whilst it is nice that they have a package for non deb/rpm distros, it should be something useable directly otherwise people on those distros might as well just unpack the deb or rpm and place things manually, thus the tar would serve no purpose.

Anyway, I got a nice reply from their SpiderOak's release engineer on Twitter:

Quote:
I'm SpiderOak's release engineer, thank you for the time and dedication to do this, I really appreciate it. It isn't trivial for us to include this immediately in our build process due to the many complexities surrounding it, but I will push to see this fixed ASAP!
[EDIT]: There are some references on their website to the currently offered tar package being a 'Slackware package' but it is not a valid Slackware package in terms of naming, layout and (lack of) meta data. So for my own attempt I didn't even bother trying to make it a valid Slackware package. I just made it nice and generic, so that it benefits as many as possible. Someone will make a SlackBuild and stick it on SBo if this software of interest to Slackware users. Hell, I might even do it myself if I get another free moment.

Last edited by ruario; 11-27-2018 at 08:01 AM.
 
Old 11-28-2018, 01:08 AM   #13
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 1,194

Rep: Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547
Delete the files that were extracted from a tarball? Loop over its contents!
Code:
#!/bin/sh
cd /
zcat /path/to/SpiderOakONE-7.3.0-slack_tar_x64.tgz |
tar tf - |
while IFS= read f
do
  echo "#testing $f"
  [ -f "$f" ] && echo rm -f "$f"
done
To really delete the files, remove the echo before the rm. (Or pipe the whole output to sh).
 
Old 11-28-2018, 02:02 AM   #14
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,460

Rep: Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528
Yeah, it'll work but why would you zcat it? The common versions of tar GNU and BSD (and even busybox tar) have had support for auto-detecting compression type and handling it from well over a decade. You know this person is using a Linux distro and it is highly unlikely to be so old or so far off the mainstream that it does not have a version of GNU tar (as its default tar), that can handle this. Just do a "tar tf /path/to/SpiderOakONE-7.3.0-slack_tar_x64.tgz". Yours feels like the zcat equivalent of "Useless Use of Cat".
 
Old 11-28-2018, 02:18 AM   #15
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,460

Rep: Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528
Sorry don't mean to be overly critical, it is a good, simple solution! It is just a pet peeve of mine that people give overly complex tar commands and this adds to tar's mystery and makes it intimidating for new (and sometimes older) users. It also means that people struggle to remember the commands. Case in point, this joke.

Tar does not have to be hard to use. With modern versions (i.e. the default version of tar that you will find on every single, modern Linux distribution), you can just do the following.

To list the contents of a tar archive:

Code:
tar tf archive
(t = Table of contents [a.k.a 'list'], f = [archive] File)

To extract the contents of an archive:

Code:
tar xf archive
(x = eXtract, f = [archive] File)

To create a tar archive:

Code:
tar caf archive [files]
(c = Create, a = Automatically compress [based on extension], f = [archive] File)

This will cover 90+% of people's usage of tar. If they want something more or fancier, they can read the manual.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you uninstall software which doesn't have an uninstall-file? lagu2653 Linux - Software 2 12-08-2005 12:36 PM
uninstall from src if no make uninstall dtra Linux - Software 3 04-29-2005 09:13 AM
how to uninstall source tarball packages ? xround Linux - Software 2 10-20-2004 09:18 AM
Source uninstall with 'make uninstall' HOWTO! Creeps Linux - Newbie 6 09-14-2004 11:03 AM
How to uninstall programs from compiled from tarball? timberwolf Linux - Software 4 12-10-2003 03:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration