Archive of Computer posts which does not fit into Physics Log

Where you want to scroll?

  1. How to remove Ubuntu 16.04 LTS or even earlier version completely?
  2. How to uninstall MATLAB in Ubuntu or other Linux distros?
  3. Mouse cursor moves slowly while copying a large file to USB

How to remove Ubuntu 16.04 LTS or even earlier version completely?

Written by: Damodar Rajbhandari
Reading Time: Approx. 5 mins

Suppose, you want to remove your Ubuntu version completely because of some reason, and format the drive too where the Ubuntu preserved its partition.

First, you have to know, this method will completely wipe your hard drive. So, if you have any important files then, move it to an external storage.

Simplest Steps for you:

1. Boot from the Ubuntu Installer/Live CD

2. Choose “Try Ubuntu” and it’ll show you the Live Desktop

3. Open a terminal by using “ctrl+alt+T”

4. Now, in your terminal,

Type: 
sudo dd if=/dev/zero of=/dev/sda bs=1M count=8 && sync

5. Shut-down it, by typing “shutdown now” in your terminal.

6. Hooray! Now, you can install windows.

Last words: In above context, I supposed that you have not that old computer where it uses IDE cables for the hard drives (wide connector). If yes then, you have to use “hda” instead of “sda” in step 4.


How to uninstall MATLAB in Ubuntu or other Linux distros?

Written by: Damodar Rajbhandari

Reading Time: Approx. 5 mins

Most of the software have uninstalled script to uninstall the whole software but in MATLAB there is no uninstaller. So, To remove MATLAB, you simply need to delete the MATLAB installation by following the instruction below:

Note: If you haven’t activated the license file then, simply escape the step 1 and 2.

1. If you are running a license manager for MATLAB, shut down the license manager using the lmdown script located in MATLAB’s directory. If this folder doesn’t exist then, remember you’re not running the FlexNet license manager.

For example:
[email protected]:~$ /usr/local/MATLAB/R2010b/etc/lmdown

2. You should also remove any license manager files in the /var/tmp directory. These files should begin with lm_TMW.

For example:
[email protected]:~$ rm /var/tmp/lm_TMW*

3. Remove the entire root MATLAB directory using the rm -rf command. The -r argument stands for recursive. It means, it will remove what you ask, as well as all the files and directories underneath it. And, the -f argument stands for force. It means, it will ignore non-existent files and never prompt.

For example:
[email protected]:~$ rm -rf /usr/local/MATLAB/R2010b

4. Remove any symlinks to MATLAB binaries on the path.

For example:
[email protected]:~$ rm /usr/local/bin/matlab /usr/local/bin/mcc /usr/local/bin/mex /usr/local/bin/mbuild

I hope this will work for you!


Mouse cursor moves slowly while copying a large file to USB

Written by: Damodar Rajbhandari

Reading Time: Approx. 5 mins

Are you facing system freezes/ unresponsive/ unusable while copying the large file to your USB drive in Ubuntu 16.04 LTS. Don’t worry about it. This post will help you to solve this issue.

First of all, we have to open the terminal (ctrl+alt+T). Now, follow the steps below.

[email protected]:~$ sudo su

This command will help you to prevent typing your sudo password again and again. Then, you’ll see;

[email protected]: /home/field#

Now, Type below command to edit the sysctl.conf file.

[email protected]: /home/field# gedit /etc/sysctl.conf

ChanThen, a document will instantly open on your desktop. Add the below lines at the end of it. If you’re curious about what are these lines are? Then, Visit the post “Better Linux Disk Catching & Performance with vm.dirty_ratio & vm.dirty_background_ratio“.

vm.dirty_background_ratio = 5

vm.dirty_ratio = 10

Now, save and close it. In your terminal, Type the below command to see whether it is working or not.

[email protected]: /home/field# sysctl -p

Then, you’ll see;

[email protected]: /home/field# sysctl -p

vm.dirty_background_ratio = 5
vm.dirty_ratio = 10
[email protected]: /home/field#

Hurray, You made it! Now, Type exit in your terminal to exit from sudo su state and again, type exit to close the terminal window. Finally, Copy your large file to test whether it’ll work or not! I hope it’ll work.