I initially installed protobuf 3.13.0 and then used apt remove to remove it but it is not getting removed.
I even installed protobuf 3.6.1 from source following these instructions but still 3.13.0 is in place
$ protoc --version libprotoc 3.13.0 $ sudo apt-get install protobuf-compiler libprotobuf-dev $ sudo apt remove protobuf-compiler libprotobuf-dev Reading package lists... Done Building dependency tree Reading state information... Done Package 'libprotobuf-dev' is not installed, so not removed Package 'protobuf-compiler' is not installed, so not removed The following packages were automatically installed and are no longer required: libprotobuf-lite17 libprotoc17 linux-image-5.4.0-58-generic linux-modules-5.4.0-58-generic linux-modules-extra-5.4.0-58-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded. $ sudo apt-get install protobuf-compiler libprotobuf-dev $ sudo apt remove protobuf-compiler libprotobuf-dev Reading package lists... Done Building dependency tree Reading state information... Done Package 'libprotobuf-dev' is not installed, so not removed Package 'protobuf-compiler' is not installed, so not removed The following packages were automatically installed and are no longer required: libprotobuf-lite17 libprotoc17 linux-image-5.4.0-58-generic linux-modules-5.4.0-58-generic linux-modules-extra-5.4.0-58-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded. installed 3.6.1 using:
$ wget $ tar -xvzf protobuf-all-3.6.1.tar.gz $ cd protobuf-3.6.1/ $ ./configure $ make $ make check $ sudo make install $ sudo ldconfig 1 Answer
I noticed I have:
$ which -a protoc /home/mona/anaconda3/bin/protoc /usr/local/bin/protoc I added the last line in ~/.bashrc:
$ tail ~/.bashrc alias vi='vim' aa_prompt_defaults alias bat='batcat' alias fd='fdfind' alias protoc=/usr/local/bin/protoc then:
$ source ~/.bashrc now:
$ protoc --version libprotoc 3.6.1