No install build
Unreal has not made install target for the command “make install” so you will have to run it as is. Long time ago somewhere in the archlinux community I had seen some solution to install it to opt, but it might break something as it is very old post.
Clean the source
As for cleaning the source make a text file clean.sh with these and put in the root of UnrealEngine folder
rm -rf Engine/Intermediate/Shaders Engine/Saved Engine/DerivedDataCache Engine/Intermediate/CachedAssetRegistry.bin
rm -rf Engine/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/UE4Editor Engine/Binaries/Linux/libUE4Editor-* Engine/Binaries/Linux/UE4Editor
rm -f Engine/Binaries/Linux/Unreal* Engine/Binaries/Linux/UE*
Engine/Binaries/Linux/libUnreal* Engine/Binaries/Linux/libUE* Engine/Binaries/Linux/libSh*
Engine/Binaries/Linux/ShaderCompileWorker* Engine/Binaries/Linux/SlateViewer* Engine/Binaries/Linux/CrashReportClient*
rm -rf Engine/Intermediate/Build Engine/Binaries/Linux/HTML5 Engine/Binaries/Linux/Linux Engine/Binaries/Linux/Android Engine/Binaries/Linux/IOS Engine/Binaries/Linux/HTML5
then from the console run ./clean.sh or execute it from the file browser
Remember that you will have to again build the engine from the beginning!