Uninstall and clean
Remove the installed tree and the cloned sources of one EPICS-env clone, and
keep its .local settings files for the next build.
Prerequisites
- The EPICS-env clone that built the tree, with the same
configure/CONFIG_SITE.local. The targets compute the tree path from it;make print-INSTALL_LOCATION_EPICSprints the path they act on. - Write access to the installed tree.
make uninstallremoves the tree as your user and does not usesudo.
-
Optional: to remove the installed files of one module, run its uninstall target before you remove the tree:
make uninstall.<module><module>is the module name without the version, such asasyn; theModulecolumn of Module pins and dependencies lists every name. The target runsmake uninstallin the module source tree, which reads the installed base, and leaves an empty module directory. Forstd,conf.stdsupplies the installed base path to the child IOC while retaining upstream cleanup recursion. Configure the module before cleanup if its child settings are absent or name another tree.make uninstall.modulesuninstalls every module and then removes its installation directory, preserving the installed base and source trees. -
Optional: to remove the build products and the installed files of one module and keep its sources, run its clean target before you remove the tree:
make distclean.<module>The target runs
make distcleanin the module source tree. The EPICSdistcleantarget also uninstalls, so the target leaves an empty module directory in the installed tree, asmake uninstall.<module>does.make clean.modulesruns this target for every module. It preserves tracked sources and user local settings. Upstream motor cleanup removes its generatedmodules/RELEASE.<host_arch>.local; the motor Makefile recreates that file when needed. -
Remove the installed tree:
make uninstallThe output names the path that the target removes:
Removing <install_location>/1.4.0/debian-13/7.0.10...<install_location>is the value ofINSTALL_LOCATION. The target removes the whole tree for the current release, operating system, and base version, including thevendordirectory, and leaves other trees under<install_location>in place. -
Remove the cloned sources:
make distcleanThe target removes
epics-base-src, every module source tree, andconfigure/MODULESGEN.mk. Make writesconfigure/MODULESGEN.mkagain on the next action invocation. Query-only invocations leave it absent and derive current module variables in memory. To remove only part of this set, runmake distclean.base,make distclean.modules, ormake distclean.modulesgen. -
Remove the version file that
make installwrote in the clone:make src_cleanThe target removes
site-template/.versions.
The .local files stay: configure/CONFIG_SITE.local,
configure/RELEASE.local, and the RELEASE.local and CONFIG_SITE.local
that make conf wrote at the repository top. A later
build reuses the first two, and make conf rewrites
the other two.
Verification
-
Check that the installed tree is gone:
LC_ALL=C make existThe output is:
No <install_location>/1.4.0/debian-13/7.0.10 -
Check that no source tree is left:
ls -d *-srcThe output is:
ls: cannot access '*-src': No such file or directory