Ask Your Question
0

Vagrant package "already installed" even though I deleted directory and file

asked 2014-03-12 05:25:23 -0500

drivelous gravatar image

I'm going through the tutorial Getting Started With Django and we must download Vagrant. I was getting a weird error and decided to uninstall/reinstall with the official instructions. While I was able to delete it, any time I try to run the Vagrant 1.5 package installer it says it's already installed.

I'm still new to Fedora and don't know any commands to detect if it still really is installed.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-03-12 18:09:16 -0500

wquine gravatar image

updated 2014-03-12 18:12:47 -0500

How did you install vagrant? Did you install an RPM? If so, then you'll need to also remove the package from the package database.

Simply running yum remove vagrant will remove the package, you shouldn't need to use 'rm' at all.

edit flag offensive delete link more

Comments

Worked! I'd like to know how that worked though. When I was getting the "already installed" error, what was it checking if the correct directory and binary files were deleted? I ask this because I get a bit antsy about installing so many packages and so many dependencies - every package and every dependency always seems like another potential compatibility issue. I still don't really know what's going on when I install something - whether it's from an RPM, from yum, etc.,.

drivelous gravatar imagedrivelous ( 2014-03-13 02:08:32 -0500 )edit
1

When a package is installed/removed this is recorded in the rpm database; just deleting the files that are included in the package, doesn't modify the rpm database, so if you only delete the files rpm still thinks the package is installed.

As others said, the way to remove an rpm is by unintalling it, not deleting its files manually.

Ahmad Samir gravatar imageAhmad Samir ( 2014-03-13 02:51:59 -0500 )edit
0

answered 2014-03-12 05:34:48 -0500

cobra gravatar image

Did you do both the directory removal:

rm -fr /opt/vagrant

and the binary file removal

rm -f /usr/bin/vagrant

as the root user?

Did the directories get removed? In Fedora packages often get installed in a different place, it could be that they've been put into /usr/local/vagrant, so it would be worth checking that.

There might also be lingering configuration files in the /etc directory. Look for /etc/vagrant or /etc/vagrant.conf

You could also do this as a final check:

updatedb
locate vagrant

which should tell you where any other system files are located so you can remove them (updatedb might take a few minutes to run).

edit flag offensive delete link more

Comments

I looked everywhere that you've pointed me but haven't been able to find it. I don't know how the rpm determines what's installed or not, but one thing I have is a directory from when I did this tutorial a month ago on a different computer - I saved the entire folder and moved it over when my Macbook died. Is it possible that there's conflict there?

drivelous gravatar imagedrivelous ( 2014-03-12 16:20:14 -0500 )edit

Question Tools

Stats

Asked: 2014-03-12 05:25:23 -0500

Seen: 1,291 times

Last updated: Mar 12 '14