Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.