Skip to content

Instantly share code, notes, and snippets.

@nmwalsh
Created December 18, 2017 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmwalsh/6bc4ed18fae31caa2df6f1fb189388ef to your computer and use it in GitHub Desktop.
Save nmwalsh/6bc4ed18fae31caa2df6f1fb189388ef to your computer and use it in GitHub Desktop.
if [[ `uname` == 'Linux' ]]; then
echo 'Removing old Torch files from your Linux...'
# Removing folders
sudo rm -rf /usr/local/lib/{luarocks/,lua/,torch/,torchrocks/}
sudo rm -rf /usr/local/share/{torch,cmake/torch/,lua}
sudo rm -rf /usr/local/etc/{luarocks/,torchrocks/}
sudo rm -rf /usr/local/include/{torch,TH,THC,lauxlib.h,lua.h,lua.hpp,luaT.h,luaconf.h,luajit.h,lualib.h,qtlua}
sudo rm -rf ~/.luarocks
sudo rm -rf ~/.cache/luarocks*
# Removing files
sudo rm -f /usr/local/bin/{torch,th,qlua,json2lua,lua2json,torch-lua,torch-qlua,torch-rocks,torch-rocks-admin,luajit,luarocks,mdcat,qlua}
sudo rm -f /usr/local/lib/{*lua*,*TH*}
fi
echo
echo 'All files from previous installation/s have been removed from your system.'
echo 'You can now install the new Torch7! :)'
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment