Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Console Foundations Installing Software Building Software From Source

Sarah A. Morrigan
Sarah A. Morrigan
14,329 Points

Removing software that was manually built

When I use apt-get or synaptic, uninstalling software is pretty self-explanatory (sudo apt-get remove...).

But I have a few programs I had installed manually in the past (I'm using Lubuntu 14.04 "trusty") and I've been wanting to clean up some clutter by uninstalling them.

Is there a good way to remove those?

And also: is it safe to delete files that were untarred (in this video's example, sqlite3 in the ~/src/sqlite3* directory) once the program was compiled?

1 Answer

It is usually safe to remove the source folder after the compilation & installation phases are complete.

Having them around helps with the uninstallation process (which relates to your first question). If you want to uninstall a manually installed software package just go to the source folder (where the Makefile script for that package is) and type the following at the command prompt:

sudo make clean uninstall

The clean target will delete the compilation artefacts in the local directory. The uninstall target should remove the binary package artefacts from where they were previously installed.

Note that not all package developers include an uninstall target in their Makefile script, so your results may vary depending on the actual package you are trying to install/uninstall.