added debug mode for testing apt installs and fixed apt removal